Answer the question
In order to leave comments, you need to log in
How to force Opera to refresh the page after pressing the Back button
I press the Back button in the Opera browser, instead of returning me to the previous URL and refreshing the page, the opera gets the page from its cache.
Searched the Internet, found things that do not work for example:
and
do not work.
How to beat it?
header('Pragma: no-cache');
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
meta http-equiv="Cache-Control" content="no-cache, no-store, must- revalidate"
meta http-equiv="Pragma" content="no-cache"
meta http-equiv="Expires" content="-1"
Answer the question
In order to leave comments, you need to log in
If you find a way, please don't tell anyone. I don't want to see this kind of behavior everywhere :)
And I have a question. Look, 2 situations:
1) the user opened your page, switched to another tab, went to drink tea, googled, returned, switched to a tab with data that was outdated many hours ago
2) the user left your page using the link, clicked "Back" and I saw a little outdated data
If you want to solve problem 2, why don't you solve more actual problem 1?
You can decide like this. when loading the page, make an Ajax request to the server and, if newer information is available, update it with Ajax.
Browsers should not cache POST requests, which means the back button will not work either.
Try to perform POST requests in the right places, instead of GET.
You can put Yandex.metric and select all the checkboxes for the counter (more precisely, track the hash code).
At me then at return "back" the opera refreshes the page. But, I won’t say for sure about POST whether it will send a request or not
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question