Dev
Dev

Reputation: 31

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

I have created the HTML page for example page1.html with some setting onclick invoke page2.html

On Click Back button the page1 is getting loaded will all previous data. I want complete reload of page and donot want to remeber any setting.

Regards, Dev

Upvotes: 3

Views: 6708

Answers (2)

Delan Azabani
Delan Azabani

Reputation: 81492

Set the following headers:

Pragma: no-cache
Cache-control: no-cache
expires: 0

Upvotes: 2

mplungjan
mplungjan

Reputation: 178403

Simplest is to expire page1 - 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 head of that page

Upvotes: 1

Related Questions