mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Uses an additive approach to generating anti-cache parameters rather than a timestamp. Fixes #12550
This commit is contained in:
parent
f9f034db6f
commit
8bae5e19af
@ -3,6 +3,8 @@ var
|
|||||||
ajaxLocParts,
|
ajaxLocParts,
|
||||||
ajaxLocation,
|
ajaxLocation,
|
||||||
|
|
||||||
|
antiCacheValue = jQuery.now(),
|
||||||
|
|
||||||
rhash = /#.*$/,
|
rhash = /#.*$/,
|
||||||
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
|
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
|
||||||
// #7653, #8125, #8152: local protocol detection
|
// #7653, #8125, #8152: local protocol detection
|
||||||
@ -618,7 +620,7 @@ jQuery.extend({
|
|||||||
// Add anti-cache in url if needed
|
// Add anti-cache in url if needed
|
||||||
if ( s.cache === false ) {
|
if ( s.cache === false ) {
|
||||||
|
|
||||||
var ts = jQuery.now(),
|
var ts = antiCacheValue++,
|
||||||
// try replacing _= if it is there
|
// try replacing _= if it is there
|
||||||
ret = s.url.replace( rts, "$1_=" + ts );
|
ret = s.url.replace( rts, "$1_=" + ts );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user