javascript - Does 'cache: false' PREVENT caching, or UNIQUE-IFY the request to bypass cached? -


If I make many requests for a resource via 'Ajax call with cache: wrong', it Preventing by caching each response by using each heading (or any other way) from browsing, or bypasses cached responses first because the resource URL _ = date is the absolute Is made unique due to this and thus nothing in the cache matches?

As a reference, here is the jquery documentation on Ajax's Cache property: ' If set to false, then it requests that the pages browsed by the browser. Note: Setting the cache to false will only work properly with HEAD and GET requests. It works by adding "_ = {timestamp}" to the GET parameter. '

Does this really require that the page not be cached? Or does it duplicate that effect by adding that date - it affects the fact that no two requests are ever the same and therefore a new request has been made (but all while poor browsers have a whole bunch of cached But never used to respond)? / P>

(If I miss to understand the method of caching, then I feel free from the school! (I originally assumed the main value type system that the key information is requested , And the price is the response to that request.))

Yes, if you type cache: false , then attach it only _ = {timestamp} after the URL + parameter.

From jquery:

  cacheURL = s.url; // More options handling for requests with no content (! S.hasContent) {// if data is available, add data to the URL (s.data) {cacheURL = (s.url + = (rquery.test) (CacheURL)? "And": "?") + S.data); // # 9682: Delete the data so that it can not be used in the last retry attempt to remove s.data; } // Add anti-cache to url if necessary (s.cache === incorrect) {s.url = rts.test (cacheURL)? // If there is already a '_' parameter, then retrieve its value cache URL (RTS, "$ 1_ =" + nonce ++): // otherwise add an end to the end cache URL + (rquery.test ( CacheURL)? & Quot;; ":"? ") +" _ = "+ Non ++;}}  

Comments