Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8824249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:33:53+00:00 2026-06-14T06:33:53+00:00

I am doing an http GET to fetch data, I am using IXMLHTTPRequest2. If

  • 0

I am doing an http GET to fetch data, I am using IXMLHTTPRequest2.

If I GET url “http://foo.com” (curl “http://foo.com”), the second time I get this url again, the content on server is actually changed, but what I am getting is the cached result.

Caching seems only honor URL, so if different header with same URL, still same cached result.
I have tried “Cache-Control: no-cache”, “Cache Control: no-store”, and “Pragma: no-cache”. None of them are honored by the API.

Is there a way to turn cache off or walk around? (One walk around I am using is appending garbage at end of URL but I am not feeling good with it).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T06:33:54+00:00Added an answer on June 14, 2026 at 6:33 am

    my question got answered here by Prashant: http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/1df95d3e-68c9-4351-822a-c2cfde380248/#1df95d3e-68c9-4351-822a-c2cfde380248

    You can force XHR to retrieve the latest content by setting the “If-Modified-Since” HTTP header in the request and set a time in the past.
    If you have control over the server response, you could send back an Expires HTTP response header with a value 0 or a date in the past. That should make XHR retrieve the latest response for you.

    You are only required to do one of the above, changing both the client and server side code is not necessary.

    The client side code could be changed to something like this:

    xhr->Open(...)
    xhr->SetRequestHeader(L"If-Modified-Since", L"Sat, 01 Jan 2000 00:00:01 GMT");
    xhr->Send(...)
    

    For changing the server side behavior if your server side code is based on ASP.net you could change your response header like this:

    Response.Headers.Add("Expires", "0")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing this to fetch some data: c = pycurl.Curl() c.setopt(pycurl.ENCODING, 'gzip') c.setopt(pycurl.URL, url)
I am doing some json parsing in a bash script: curl http://myurl.com/get.json | sed
I am doing something like this- http://www.w3schools.com/html5/tryit.asp?filename=tryhtml5_video_js_prop but I want to replace the buttons
I am trying to fetch 'domain' from 'http://domain.com/some-more-path' using regex: /(.*)(http|https):\/\/(.*)(\/)(.*)/ and then $3
I'm trying to create a line like this, in PHP: $cURL = $curl_init('http://mysite.com/2'); I'm
hudson supports submitting a build by doing an HTTP GET to an API. I
I am doing: html = new WebClient().DownloadString( http://www.google.com/search?sourceid=chrome&ie=UTF-8&q= + biocompany); and i am getting
I am doing the following tutorial http://msdn.microsoft.com/en-us/library/ms731835%28v=vs.100%29.aspx and the program is working perfectly fine.
Alright, so I have a php that responds to a GET HTTP request; this
I get security exception when using System.Net.WebClient to do HTTP requests, which is due

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.