mirror of
https://github.com/jquery/jquery.git
synced 2026-01-31 13:17:56 -05:00
Ajax: Don't mangle the URL when removing the anti-cache param
Fixes gh-3229 Closes gh-3253
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user