Question

The back button just causes my page to refresh. Is there a way around this without disabling the cache?

Was it helpful?

Solution

Try adding this to your HTML header:

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

OTHER TIPS

where you click on product/image on page there call onclick javascript function i.e.

function getHashOnBack(valueget) 
{
   location.hash = "#backTo=" + $(window).scrollTop();$(document).height();
}

Now, put

$(document).ready(function () 
{
 var ab = window.location.hash.substring(1).split("=");
 if (ab[0] == "backTo") 
 {
  // this would be called automatically when back putton pressed and hav #back=1234   etc. // value in url

  $(window).scrollTop(parseInt(ab[1]));
}
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top