I have a web page x.php
(in a password protected area of my web site) which has a form and a button which uses the POST
method to send the form dat
I poked around and this is quite a hard problem. Its also a major pain in the ass for Dynamically modified content. You visit the page, javascript augments it with your instruction, you go to the next page, and come back, and javascript has forgotten. And there's no way to simply update the page server-side, because the page comes out of cache.
So I devised a back-button-cache-breaker.
Its evil and bad-for-the-web, but it makes it able for pages to behave how people expect them to behave instead of magically warping all over the place.
This will do a bit of magic in that it detects whether or not the page you are /currently/ viewing was loaded from cache or not.
if you're there the first time, it will detect "no hash" , and add "#_
" to the page url.
if you're there for the >1st time ( ie: not a direct link to the page ), the page already has the #_ on it, so it removes it and in the process of removing it, triggers a page reload.