From: Chuck on
I'm using MSXML2.XMLHTTP to poll (every 6 seconds) a text file containing
weather data from a NOAA site. All is working well except when that the
file does not refresh to the most current one on the site. It is using the
file in the cache. I tried to delete the file from the 'Temporary Internet
Files' folder using 'Kill' but I get a 'file does not exist' error even
though it's there (I can manually delete it using Windows Explorer)

Is there a way to either delete this file or make sure my 'Get' code
refreshes the file?

Thanks
Chuck


From: Jason Keats on
Chuck wrote:
> I'm using MSXML2.XMLHTTP to poll (every 6 seconds) a text file containing
> weather data from a NOAA site. All is working well except when that the
> file does not refresh to the most current one on the site. It is using the
> file in the cache. I tried to delete the file from the 'Temporary Internet
> Files' folder using 'Kill' but I get a 'file does not exist' error even
> though it's there (I can manually delete it using Windows Explorer)
>
> Is there a way to either delete this file or make sure my 'Get' code
> refreshes the file?
>
> Thanks
> Chuck
>
>

If you're using MSXML2.XMLHTTP via JavaScript/VBScript within a web page
loaded into Internet Explorer (using Ajax-like calls) then I can see how
the local IE cache may affect your results. In which case you could try
changing IE's caching strategy from Automatic to "Check for newer
versions of stored pages: Every time I visit the webpage".

However, the appearance of your question in this group leads me to
believe you're using VB6 - in which case I find it difficult to believe
your page is being cached by IE (unless you've somehow cleverly caused
this to be the case).

The data could be cached by your company's proxy server (if there is
such a thing), your ISP's cache (they sometimes have them), or the cache
on the NOAA site (more likely) - in which case you're probably stuffed.

HTH
From: Chuck on
Thanks for the input Jason.

I'm using simple VB6 code.

Set obj = CreateObject("MSXML2.XMLHTTP")
obj.open "GET",
"http://weather.noaa.gov/pub/data/observations/metar/decoded/" & k & ".TXT",
False
obj.send
strObj = obj.responseText

Chuck

> If you're using MSXML2.XMLHTTP via JavaScript/VBScript within a web page
> loaded into Internet Explorer (using Ajax-like calls) then I can see how
> the local IE cache may affect your results. In which case you could try
> changing IE's caching strategy from Automatic to "Check for newer versions
> of stored pages: Every time I visit the webpage".
>
> However, the appearance of your question in this group leads me to believe
> you're using VB6 - in which case I find it difficult to believe your page
> is being cached by IE (unless you've somehow cleverly caused this to be
> the case).
>
> The data could be cached by your company's proxy server (if there is such
> a thing), your ISP's cache (they sometimes have them), or the cache on the
> NOAA site (more likely) - in which case you're probably stuffed.
>
> HTH


From: Chuck on
One last observation, if I manually delete the temporary files in IE then my
app applies the data from the current file. Is there a way to delete the
temp files from within my app? I tried using delete files and kill but that
doesn't work. Thanks.

Chuck

"Chuck" <astrocody(a)hotmail.com> wrote in message
news:aNKdnUZi46V2sMPVnZ2dnUVZ_hzinZ2d(a)comcast.com...
> Thanks for the input Jason.
>
> I'm using simple VB6 code.
>
> Set obj = CreateObject("MSXML2.XMLHTTP")
> obj.open "GET",
> "http://weather.noaa.gov/pub/data/observations/metar/decoded/" & k &
> ".TXT", False
> obj.send
> strObj = obj.responseText
>
> Chuck
>
>> If you're using MSXML2.XMLHTTP via JavaScript/VBScript within a web page
>> loaded into Internet Explorer (using Ajax-like calls) then I can see how
>> the local IE cache may affect your results. In which case you could try
>> changing IE's caching strategy from Automatic to "Check for newer
>> versions of stored pages: Every time I visit the webpage".
>>
>> However, the appearance of your question in this group leads me to
>> believe you're using VB6 - in which case I find it difficult to believe
>> your page is being cached by IE (unless you've somehow cleverly caused
>> this to be the case).
>>
>> The data could be cached by your company's proxy server (if there is such
>> a thing), your ISP's cache (they sometimes have them), or the cache on
>> the NOAA site (more likely) - in which case you're probably stuffed.
>>
>> HTH
>
>


From: Jason Keats on
You're absolutely correct about IE caching the data. Thanks, I didn't
know that.

However, deleting the cache using code is going to be tough. I haven't
yet found a way to it.

The easiest way is to tick the advanced option in IE to "Empty Temporary
Internet Files Folder when browser is closed". Then open and close IE!

HTH


Chuck wrote:
> One last observation, if I manually delete the temporary files in IE then my
> app applies the data from the current file. Is there a way to delete the
> temp files from within my app? I tried using delete files and kill but that
> doesn't work. Thanks.
>
> Chuck
>
> "Chuck" <astrocody(a)hotmail.com> wrote in message
> news:aNKdnUZi46V2sMPVnZ2dnUVZ_hzinZ2d(a)comcast.com...
>> Thanks for the input Jason.
>>
>> I'm using simple VB6 code.
>>
>> Set obj = CreateObject("MSXML2.XMLHTTP")
>> obj.open "GET",
>> "http://weather.noaa.gov/pub/data/observations/metar/decoded/" & k &
>> ".TXT", False
>> obj.send
>> strObj = obj.responseText
>>
>> Chuck
>>
 |  Next  |  Last
Pages: 1 2 3
Prev: Mixing VB6 and .NET
Next: Adding 2 hex values