August 2012 Entries

Fixing Chrome’s AJAX Request Caching Bug

I recently had to make a set of web pages restore their state when the user arrived on them after clicking the browser’s back button. I used JQuery's ajax function to get the data, but even with JQuery's cache: false setting and MVC's OutputCache attribute, Chrome insisted on retrieving it from its cache. Here's how I solved the problem.