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

  • SEARCH
  • Home
  • 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 7699875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:34:53+00:00 2026-05-31T22:34:53+00:00

WebClient.DownloadStringAsync does cache the server response. After once getting a response from the server

  • 0

WebClient.DownloadStringAsync does cache the server response.
After once getting a response from the server I get a response even without internet connection!

Is WebClient caching smart enough to determine from the server response how long to cache?
Or is it buggy and I should disable caching.

Backgound info:

Url: http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml

Fiddler trace:

GET /stats/eurofxref/eurofxref-daily.xml HTTP/1.1
Accept: /
Referer: file:///Applications/Install/4D0DF1F7-1481-45CA-86BE-C14FF5CCD955/Install/
Accept-Encoding: identity
User-Agent: NativeHost
Host: http://www.ecb.europa.eu
Connection: Keep-Alive

HTTP/1.1 200 OK
Date: Sun, 25 Mar 2012 08:54:40 GMT
Server: Apache/2.2.3 (Linux/SUSE)
Last-Modified: Fri, 23 Mar 2012 13:31:39 GMT
ETag: “19d4e5-6a9-4bbe90b5904c0”
Accept-Ranges: bytes
Content-Length: 1705
Keep-Alive: timeout=3, max=200
Connection: Keep-Alive
Content-Type: text/xml
Set-Cookie: BIGipServerPOOL.www.ecb.europa.eu_HTTP=2684883628.16415.0000; path=/

…

Disabling caching via Headers does not work:

.Headers(“cache-control”) = “no-cache”
.Headers(“HttpRequestHeader.IfModifiedSince”) = DateTime.UtcNow.ToString()

Disabling caching via appending uniqa parameter works:

“http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml” & “?MakeRequestUnique=” & Environment.TickCount

  • 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-05-31T22:34:54+00:00Added an answer on May 31, 2026 at 10:34 pm

    The integrated cache isn’t smart at all. So if you expect different results when querying the page, you have to bypass it. I say ‘bypass’ because there’s no way I know of to disable it with the WebClient (I don’t think it’s enabled if you directly use the HttpRequest class).
    So if you want to use the WebClient, the best way is to append a random parameter to the request.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get contents of http://www.yahoo.com using WebClient#DownloadStringAsync() . However as Silverlight
I'm using a WebClient to get infos asynchronously from my web service : wc.DownloadStringCompleted
I'm trying to use the WebClient class to download a html file from another
I get security exception when using System.Net.WebClient to do HTTP requests, which is due
I'm consuming a JSON WebService by using the WebClient.DOwnloadStringAsync. The returning string contains some
I'm using a simple webclient to retrieve some XML from a web service, I
I make the download of an xml file from the internet to the memory
i need to save a xml file from a server.. i found a code
As an example: WebClient.DownloadStringAsync Method (Uri) Normal code: private void wcDownloadStringCompleted( object sender, DownloadStringCompletedEventArgs
I'm trying to make an asynchronous HTTP GET request using Webclient, however, the registered

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.