Skip to content

Commit 8bae5e1

Browse files
committed
Uses an additive approach to generating anti-cache parameters rather than a timestamp. Fixes #12550
1 parent f9f034d commit 8bae5e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ajax.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ var
22
// Document location
33
ajaxLocParts,
44
ajaxLocation,
5+
6+
antiCacheValue = jQuery.now(),
57

68
rhash = /#.*$/,
79
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
@@ -618,7 +620,7 @@ jQuery.extend({
618620
// Add anti-cache in url if needed
619621
if ( s.cache === false ) {
620622

621-
var ts = jQuery.now(),
623+
var ts = antiCacheValue++,
622624
// try replacing _= if it is there
623625
ret = s.url.replace( rts, "$1_=" + ts );
624626

0 commit comments

Comments
 (0)