httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: IE always loads graphics
Date Fri, 29 Mar 2002 16:38:52 GMT

On Sat, 30 Mar 2002, Mark Constable wrote:

> This is more of a browser problem but seeing most
> users banging on apache probably use IE then there
> might be a server or paged based solution. I'm using
> rewrite rules to manage vhost sub-domains where going
> to www.some.com is managed in the some.com virtualhost
> entry like this...
>
>  RewriteEngine on
>  RewriteCond   %{HTTP_HOST} ^[^.]+\.some\.com$
>  RewriteRule   ^(.+) %{HTTP_HOST}$1          [C]
>  RewriteRule   ^([^.]+)\.some\.com(.*) /var/www/some.com
>
> which works beautifully in mozilla/netscape/konqueror
> but <wink> with IE5+ each and every access to the rewrite
> page cause all page parts (images mostly) to reload.. get
> this, even when using the back button !
>
> Is anyone aware of page or server headers that would make
> IE use it's local cache of images under the above rewrite
> rule in all cases ?

Check the response headers for the page and you will probably see
Vary: Host
The intention of this header is to tell browsers that the response will
"vary" depending on the requested Host: (HTTP_HOST in your rewriterule).
That way, they don't accidentally return the wrong page from their cache.

MSIE doesn't handle this very well and takes the presence of the Vary
header as an excuse not to cache anything.

This is a problem both with MSIE and with Apache.  In my opinion Apache
shouldn't be sending the Vary header in this case, because it does not
send it in ordinary name-virtual hosting, and this is an identical
situation.  MSIE also shouldn't be refusing to cach just because of Vary:
host.

You can get rid of the problem using
SetEnv force-no-vary
in the relevant place, as described here:
http://httpd.apache.org/docs/env.html#special
But that can sometimes have other bad consequences.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message