Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XMLHTTPRequest caching problem

From: Adrian Herscu <bmf1972@-------.--->
To: NULL
Date: 7/3/2005 1:23:00 PM
Hi Joe,

Let's say that I am building a simple brochure with few HTML pages.
Once in a month I will need to add/delete few things to some of those 
HTML pages -- in this case I expect that MS-IE will load the new 
versions of those HTML pages, in other words I expect that MS-IE will 
revalidate its cache each time the user accesses those HTML pages and 
will always present the last version to users.

Later, I will add some CSS rules and maybe even some JavaScript/DHTML 
scripts and I will hyperlink them to those HTML pages. Again, once in a 
month I will need to change one of those files -- in this case I expect 
that MS-IE will revalidate its cache and will always give the last 
version of styling/behavior to users.

The same works with _hyperlinked_ XML and XSLT files -- in all those 
cases MS-IE sends a GET request with "if-modified-since" header, the 
server replies 200 (and document content) or with 304 (not modified -- 
use your cached version!).

While loading files through the _XMLHTTPRequest_ object, MS-IE no longer 
revalidates its cache. Once the file is loaded, it enters the cache and 
no more requests are send to the server, never! MS-IE expects that files 
loaded through the _XMLHTTPRequest_ will never change! In this case, if 
users want to get the last versions of files, they will have to manually 
empty their browser cache. Why?

Adrian.


Joe Fawcett wrote:
> "Adrian Herscu" <bmf1972@a...> wrote in message 
> news:e2rC2kvfFHA.3936@T......
> 
>>Hi Neil,
>>
>>Although I never used PHP, by looking at your snippet I recognize that this 
>>solution is not different from the previous -- both circumvent the caching 
>>mechanisms between the server and its clients :-(
>>
>>This solution is worse than the previous one since it requires the 
>>installation of some server-side software (the PHP script requires a special 
>>scripting engine).
>>
>>But I guess that I will have to live with this:
>>"The Mozilla XMLHttpRequest does not cache at all - you have to handle that. 
>>The IE implementation caches by default unless told not to by the server or 
>>when a request header is sent that involves caching (like If-Modified-Since)"
>>...until somebody at Microsoft will dare to fix this bug (in Mozilla it is 
>>already fixed).
>>
>>Thanks for your time,
>>Adrian.
>>
>>
> 
> In my opinion that's not a bug. IE is following normal http protocols. Mozilla 
> gives you no choice whereas many people have requested that XSLT files are 
> cached where possible.
> 


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent