I am having problems with regard to a "strange" behaviour of Safari/Webkit on Mac OSX systems that's related to the functionality of the back button while having javascript disabled on the browser.
The scenario I have is a web application which consists of a login page that upon a successful login, would lead the user to page1. If the user logs out of page1, then he/she will get redirected to page2. Out of session and un-authenticated requests to page1 are being redirected to the initial login page via a 302 HTTP Response.
It's also worth to mention that responses to requests to page1 have the following HTTP headers present in them to prevent browsers from caching the page:
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Expires: Thu, 1 JAN 1970
Pragma: no-cache
Upon a successful log out from page1, the user get redirected to page2. If at this point intime the user decided to click on the back button, then the browser will load page1 from its cache rather than hitting the server again to retrieve a fresh copy. Please not that this all happen while javascript is DISABLED within Safari, having it ENABLED produce the expected result of reloading page1 from the web server thus having the user get redirected to the initial login page
I've tried to set an unload event handler on the page body tag to prevent Webkit from having the page loaded into its Page Cache, but that didn't seem to solve the problem.
Other mainstream browsers, FF, IE and Chrome seem to produce the expected result both in JS and non JS situations.
Am I missing something here or this sounds more of a bug with Safari/WebKit?
Cheers;