Chrome 41: Force Reload when pressing the back button
Please check this question that addresses the problem using localStorage/sessionStorage.
How to refresh page on back button click?
Try this... not tested. I hope it will work for you.
Make a new php file. You can use the back and forward buttons and the number/timestamp on the page always updates.
<?php
header("Cache-Control: no-store, must-revalidate, max-age=0");
header("Pragma: no-cache");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
echo time();
?>
<a href="http://google.com">How to Force Reloading a Page When Using Browser Back Buttonaaaaa</a>
Or
found another solution
The onload event should be fired when the user hits the back button. Elements not created via JavaScript will retain their values. I suggest keeping a backup of the data used in dynamically created element within an INPUT TYPE="hidden" set to display:none then onload using the value of the input to rebuild the dynamic elements to the way they were.
<input type="hidden" id="refreshed" value="no">
<script type="text/javascript">
onload=function(){
var e=document.getElementById("refreshed");
if(e.value=="no")e.value="yes";
else{e.value="no";location.reload();}
}
Related Topics
How to Set a JavaScript Object Values Dynamically
Can Mustache Templates Do Template Extension
Inline Ruby in :JavaScript Haml Tag
How to Set State Inside a Useeffect Hook
Splitting a Js Array into N Arrays
(...()) VS. (...)() in JavaScript Closures
How to Enable Touch on Multiple Buttons Simultaneously in React Native
Parsing JSON Giving "Unexpected Token O" Error
How to Convert a String to Bytearray
How to Get Objects Value If Its Name Contains Dots
Are Functions in JavaScript Tail-Call Optimized