How to reload the page on the back button in any browser

I created an HTML page like page1.html with some onclick invoke page2.html setting

When you click the "Back" button on page 1, all previous data is loaded. I want the full page reload and donot want to remember any settings.

Regards, Dev

+3
source share
2 answers

Set the following headers:

Pragma: no-cache
Cache-control: no-cache
expires: 0
+2
source

The simplest is the expiration date of page 1 - for example

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">

in the title of this page

+1
source

Source: https://habr.com/ru/post/1743984/


All Articles