开发者

Weird jQuery query string appended

开发者 https://www.devze.com 2023-01-29 20:33 出处:网络
Can some explain what the \"_\" value is all about? This is what fiddler is showing me for my MVC 3 page that has 开发者_开发技巧a jQuery ajax call on the client.

Can some explain what the "_" value is all about? This is what fiddler is showing me for my MVC 3 page that has 开发者_开发技巧a jQuery ajax call on the client.

GET /Services/GetFoodDescriptionsLookup(100)?_=1291727469299 HTTP/1.1

When the URL is constructed in this fashion I don't get back any data, but if I type

GET /Services/GetFoodDescriptionsLookup(100)

this works..

Thank you, Stephen


It's added by jQuery to prevent caching when cache:false is set. This is basically a workaround for IE's over-eager caching that will not resubmit an AJAX GET request (unless the caching policy is extremely well-configured).

0

精彩评论

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