aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ajax.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 85b08546f..f8ec21898 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -18,7 +18,7 @@ define( [
var
r20 = /%20/g,
rhash = /#.*$/,
- rts = /([?&])_=[^&]*/,
+ rantiCache = /([?&])_=[^&]*/,
rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
// #7653, #8125, #8152: local protocol detection
@@ -604,9 +604,9 @@ jQuery.extend( {
delete s.data;
}
- // Add anti-cache in uncached url if needed
+ // Add or update anti-cache param if needed
if ( s.cache === false ) {
- cacheURL = cacheURL.replace( rts, "" );
+ cacheURL = cacheURL.replace( rantiCache, "$1" );
uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached;
}