Reputation: 169
After logout from the application if i press back button that pages are cached by browser.
i place meta tags in master pages not working
Upvotes: 1
Views: 1944
Reputation: 4309
Like @m1ke said, you will be better off controlling the caching by setting the correct HTTP headers rather than trying to set meta tags, because, as you have probably discovered yourself, many browsers ignore the caching directives in the meta tags.
I barely worry about HTTP headers or caching in my web apps though. I simply set the default caching policy in the web server to "access plus 0 days" (ie. don't cache anything) and then put in specific entries for jpg, png and other assets that I do want cached. All you really need to worry about then is clearing the session on logout and you should be OK.
I would highly recommend reading the following article on caching: http://www.mnot.net/cache_docs/
Upvotes: 0
Reputation: 1241
I'm not sure which meta tags you're talking about, but normally these tags would "expire" a page, which you can put in your templates.
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="0">
Hope this helps.
Upvotes: 1