xmlhttp and ie cache

J

Jack Clift

I am using xmlhttp.open and .send to retreive data from the internet. This
works ok but I have realised that the data retreived is not refreshed from
the web server, rather is being taken from ie cache (meaning that the data is
effectively useless).

I have tried using .setrequestheaders with a variety of options. This did
not work.

Clearing the cache does force a requery of the web server, but is not a
practical solution.

I have found one suggestion in seaches on the web that indicated a registry
setting be changed before the query, and then reset after - seems a bit
drastic for mine.

Is there a simpler solution to this?

thanks

JC
 
J

Jack Clift

Thanks Robin, have written small slice of code that submits a date string
(year, month, day, hour, minute, second), was easiest for me to do it that
way.

Works fine.

Am interested though on the origninal problem - is this a problem on the
server (web) side or something problematic with xmlhttp? Just curious for
future reference.

Cheers

JC
 
T

Tim Williams

A general "feature": I think IE's cache is also shared by other objects such
as xlmhttp. If the caching algorithm sees you making a request you've
recently made (how recently being determined by your cache settings) then
instead of making a request to the server it will simply fetch the content
from the cache. A proxy server may also do the same thing regardless of
your local settings.

Since the request "identity" is based on the URL including the querystring,
the "random" parameter will side-step the cache issue.

Tim.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top