Browse files

Fixes #14: adding notes about cache:false edge cases

  • Loading branch information...
1 parent 047a356 commit f27f4f2a527233bdbd9989ac2d5bd127d57da232 @addyosmani committed May 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 entries/jQuery.ajax.xml
@@ -22,7 +22,7 @@
<desc>A pre-request callback function that can be used to modify the jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object before it is sent. Use this to set custom headers, etc. The jqXHR and settings maps are passed as arguments. This is an <a href=''>Ajax Event</a>. Returning <code>false</code> in the <code>beforeSend</code> function will cancel the request. <strong>As of jQuery 1.5</strong>, the <code>beforeSend</code> option will be called regardless of the type of request.</desc>
<option name="cache" default="true, false for dataType 'script' and 'jsonp'" type="Boolean">
- <desc>If set to <code>false</code>, it will force requested pages not to be cached by the browser. Setting cache to <code>false</code> also appends a query string parameter, "_=[TIMESTAMP]", to the URL. </desc>
+ <desc>If set to <code>false</code>, it will force requested pages not to be cached by the browser. <strong>Note: Setting <code>cache</code> to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" to the GET parameters. The parameter is not needed for other types of requests, except in IE8 when a POST is made to a URL that has already been requested by a GET.</desc>
<option name="complete(jqXHR, textStatus)" type="Function, Array">
<desc>A function to be called when the request finishes (after <code>success</code> and <code>error</code> callbacks are executed). The function gets passed two arguments: The jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object and a string categorizing the status of the request (<code>"success"</code>, <code>"notmodified"</code>, <code>"error"</code>, <code>"timeout"</code>, <code>"abort"</code>, or <code>"parsererror"</code>). <strong>As of jQuery 1.5</strong>, the <code>complete</code> setting can accept an array of functions. Each function will be called in turn. This is an <a href=''>Ajax Event</a>.</desc>

0 comments on commit f27f4f2

Please sign in to comment.