tags:

views:

51

answers:

1

Why do you usually need to disable the browser cache when sending requests via AJAX?

+3  A: 

You don't have to, but it's for the same reason as any other browser cache disabling...you want to prevent the browser from using a previously fetched response...in other words you want the latest the server has to offer.

Usually cache headers from the server suffice, and you don't need to do much else, in other caes however...specifically, IE is the reason most of the time, it likes the cache the hell out of a response, requiring a query-string cache breaker to reliably get an non-cached response.

Nick Craver