Tuesday, October 26, 2021
Home Q&A After logout clicking, the back button page is open in Django why?

After logout clicking, the back button page is open in Django why?

This is actully a cache problem.

You can use cache_control decorator to force no cache on views

from django.views.decorators.cache import cache_control

@cache_control(no_cache=True, must_revalidate=True)
def func()
  #some code
  return

This will force the browser to make request to server.

You should also write your own decorator that replaces @login_required so that you don’t need to use both on every page.

2 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

16FansLike
10FollowersFollow
414SubscribersSubscribe

Most Popular

Best Tricks For Play & Win Ludo

Ludo King Game has now become the world’s popular game. Everyone, children, old and young, like to play this game.

RTMP V/S RTSP V/S HLS

In this article we are going to differenciate RTMP , RTSP and HLS (RTMP V/S RTSP V/S HLS) so lets start.

How To Scroll to Top, to Bottom, to Specific Element In Ionic 5 Angular?

hello, friends once again I welcome all of you to today's How To Scroll to Specific Element In Ionic Angular? article on...

How To Delete Facebook Account Permanently?

Today we will know about one problem, which people keep talking about, today we will know how to delete Facebook account. With...

Recent Comments

headlamp flashlight on RTMP V/S RTSP V/S HLS