Removing the second capture group. After the changes suggested by Jeff Roberson, the second capture group is no longer needed. See
http://stackoverflow.com/questions/3771105/can-someone-tell-me-the-purpose-of-the-second-capture-group-in-the-jquery-rts-reg
This commit is contained in:
parent
5c055040d3
commit
a088751a1b
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ var jsc = jQuery.now(),
|
|||
rbracket = /\[\]$/,
|
||||
jsre = /\=\?(&|$)/,
|
||||
rquery = /\?/,
|
||||
rts = /([?&])_=[^&]*(&?)/,
|
||||
rts = /([?&])_=[^&]*/,
|
||||
rurl = /^(\w+:)?\/\/([^\/?#]+)/,
|
||||
r20 = /%20/g,
|
||||
rhash = /#.*$/,
|
||||
|
@ -275,7 +275,7 @@ jQuery.extend({
|
|||
var ts = jQuery.now();
|
||||
|
||||
// try replacing _= if it is there
|
||||
var ret = s.url.replace(rts, "$1_=" + ts + "$2");
|
||||
var ret = s.url.replace(rts, "$1_=" + ts);
|
||||
|
||||
// if nothing was replaced, add timestamp to the end
|
||||
s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : "");
|
||||
|
|
Loading…
Reference in a new issue