Tuesday, 2 November 2010

Forcing browser to refresh on back button

This is a bit of perennial issue with web apps. When the user hits the back button the page comes out of their cache and it looks like they have just undone what they just did. This is a particular problem with asp.net applications as they are so postback heavy.

It is pretty easy to force the page to refresh from the server in IE but it is not obvious in firefox. Anyway, after much internet trawling I found this in a blog comment somewhere and thought it deserves it's own post. (Many thanks person who figured this out).

// The following combination disables page caching

// for firefox\ie\chrome

Response.Buffer = true;





  1. I had worked in asp.net for some time and during development we are in situation that we need to refresh the page on back button.Thanks for giving code.

  2. Magnumax Think than me this way What do you think Male Enhancement Supplement in order to more noticeable putting on pounds of muscle over your physique. Or putting pounds of muscle on your mirror musculature When youre at the gym the chances are you spend a considerable amount of time waiting around just to utilize piece of it technology. http://jackedmuscleextremeadvice.com/magnumax/