Note that there are some explanatory texts on larger screens.

plurals
  1. POShould I disable WebClient caching?
    primarykey
    data
    text
    <p>WebClient.DownloadStringAsync does cache the server response. After once getting a response from the server I get a response even without internet connection!</p> <p>Is WebClient caching smart enough to determine from the server response how long to cache? Or is it buggy and I should disable caching.</p> <p>Backgound info:</p> <p>Url: <a href="http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml" rel="nofollow">http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml</a></p> <p>Fiddler trace:</p> <p>GET /stats/eurofxref/eurofxref-daily.xml HTTP/1.1 Accept: <em>/</em> Referer: file:///Applications/Install/4D0DF1F7-1481-45CA-86BE-C14FF5CCD955/Install/ Accept-Encoding: identity User-Agent: NativeHost Host: www.ecb.europa.eu Connection: Keep-Alive</p> <p>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=/ ...</p> <p>Disabling caching via Headers does not work:</p> <p>.Headers("cache-control") = "no-cache" .Headers("HttpRequestHeader.IfModifiedSince") = DateTime.UtcNow.ToString()</p> <p>Disabling caching via appending uniqa parameter works:</p> <p>"http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml" &amp; "?MakeRequestUnique=" &amp; Environment.TickCount</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload