Stephen Patten
Stephen Patten

Reputation: 6363

Weird jQuery query string appended

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

Upvotes: 4

Views: 341

Answers (1)

Victor Nicollet
Victor Nicollet

Reputation: 24587

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).

Upvotes: 6

Related Questions