开发者

What causes a query string when requesting jQuery? e.g. /jquery-1.3.2.min.js?_=12553

I'm troubleshooting a jQuery problem which happens when the HTTP requests for a page load include this query string:

GET /Scripts/jquery-1.3.2.min.js?_=1255309685187

Normally, the request has no query string and the response status code is 304:

GET /Scripts/开发者_如何学JAVAjquery-1.3.2.min.js

However, every so often a query string is appended. Where does this query string come from? What does it mean?

The webserver is Visual Studio's Development Server, and I usually see this in IE8. Occasionally I'll see it in Firefox though. The app is ASP.NET MVC.


Generally such a value is a TIMESTAMP representation appended as a query string to ensure that the file you are requesting, in this case jquery-1.3.2.min.js, is not cached. The unique query string is strictly used for purposes of grabbing the newest version of the file, not one found in your browser cache.


looks like the number after is a unix time. i don't know why this would be automatically appended tho.

possibly some way of getting around browser cache? forcing a reload of the js basically?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜