Prevent Safari/any browser loading from cache when back button is clicked This problem is caused by back-forward cache. It saves complete state of page when user navigates away. When user navigates back with back button, page is loaded from cache very quickly. This is different from normal cache which only caches HTML code. This kind of situation arises mainly with ... Read More »
Home > Tag Archives: back button
Tag Archives: back button
Javascript Browser back button handling
Javascript Browser back button handling In Javascript getting handle of browser back button event is complex. There are many plugIns available to satisfy this complex need. However, I cam across a solution which to some extent can resolve this issue. if (window.history && window.history.pushState) { if(location.hash.split("#")[1]!='search'){ window.history.pushState('forward', null, '#search'); } } This piece of code will first do a forward ... Read More »