When I open any any page in browser and click on back button, it load browser from cache. I need to refresh page when I click back button, not load data from browser cache. Is there any possible solution?
1 Answer
You might need Request Header Chache-Control
The Cache-Control general-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. The directives specify behavior intended to prevent caches from adversely interfering with the request or response. These directives typically override the default caching algorithms. Cache directives are unidirectional in that the presence of a directive in a request does not imply that the same directive is to be given in the response.
Note that HTTP/1.0 caches might not implement Cache-Control and
might only implement Pragma: no-cache
1 Comment
user1791574
Thanks for your valuable answer. I did not understand that how can I use it in my gsp page. I am working on grails. Should I put it the page from where I am going to back or the page at I will go after press back button.