1

For all intense purposes what I have is working, however, I wanted to know what this extra querystring data is and where it's coming from.

jQuery.ajax({
        url: 'MyFile.aspx/ProcessRequest',
        data: JSON.stringify({status: status }),
        async: false,
        dataType: 'application/json',
        cache: false,
        success: function (data) {
  // ... do stuff with data...
  });

Using tamperdata and also viewing the Request.QueryString in the debugger the resulting url is:

http://localhost/Folder/MyFile.aspx/ProcessRequest?_=1298057136790&{%22status%22:%22pqs%22}

So where does this _1298057135790 come from and why is it there?

2 Answers 2

2

Browser and proxy server often cache the requests. By appending this, you will get fresh data. you have used the following in code.

cache:false

Changing this will remove it but it is a great chance that you may get old data, even if browser cache is disabled.

Sign up to request clarification or add additional context in comments.

Comments

0

I believe that is an attempt by stringify() or ajax() to randomize a portion of the URL so that you don't get cached data from the browser back, but get real live data from the server instead. Many browsers and web servers will cache based on the uniqueness of the URL

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.