Forcing Web Server to Deliver Fresh (Non-Cached) Response
To force a web server to send a fresh copy (not a cached copy) of the requested document, add a “Pragma: non-cache” HTTP header to the request. If sending a HTTP GET request via these methods: QuickGet, QuickGetStr, Download, etc., then add the Pragma header by calling httpObject.SetRequestHeader(“Pragma”,”no-cache”) prior to sending the GET.
If the Chilkat HTTP Request object is used (CkHttpRequest in C++, Chilkat.HttpRequest in C#/VB.NET, ChilkatHttpRequest for ActiveX, etc.) then add the Pragma header to the request object by calling: httpRequestObject.AddHeader(“Pragma”,”no-cache”)
From O’Reilly’s “HTTP The Definitive Guide” — “Pragma: no-cache is a request header that forces caches to request or revalidate the document from the origin server even when a fresh copy is available in the cache. It is sent by browsers when users click on the Reload/Refresh button.”
Original question from customer:
.. have been testing various ways of uploading and downloading flles on a WIFI connection. When I upload a file it is successfully uploaded and if I check it from a cabled connection it is correct, i.e. the latest copy. However, when I try to download the file on the WIFI connection I get an old copy of the file. I have looked at the properties that might affect this e.g. DefaultFreshPeriod and these do not appear to be relevant. If I disconnect from the WIFI and wait for a period of time (as yet undetermined) I get the latest copy. Please can you suggest anything I can do about this?