RE: IE6 Caching and mod_rewrite-ing
- From: "none" <none@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 14 Jul 2005 07:56:01 -0700
"dirkgomez@xxxxxxxxx" wrote:
> Here's the requirement: depending on a cookiee setting documents shall
> be delivered with different CSS style sheets.
>
> Here's how I solved it so far: I have a .htaccess which looks like
> this:
>
> RewriteCond %{HTTP_COOKIE} style***
> RewriteRule ^css/portal.css css/bw_portal.css [L]
>
> So if the cookie style*** is set portal.css is automagically
> rewritten to bw_portal.css.
>
> This works most of the time - the less aggressive IE's caching the
> better. Proxies may come in the way as well.
>
> For CSS files I send this http header to prevent proxy caching (via
> mod_headers)
>
> Header Set Pragma "no-cache"
>
> The page whose css gets rewritten sends these metatags:
>
> <meta http-equiv="Pragma" content="no-cache">
> <meta http-equiv="cache-control"
> content="no-cache,no-store,must-revalidate">
> <meta http-equiv="Expires" content="-1">
>
> All this is supposed to say: always ask the server for the document,
> still "randomly" IE choosess to use the wrong style***. Is appending
> a unique string to the URL the only way to force IE to really look at
> the content?
>
> -- Dirk
>
>
I don't really see why you're doing any of this server side.
You set the preference in a cookie using javascript.
When the page loads, you set the style*** by looking at the cookie.
.
- References:
- IE6 Caching and mod_rewrite-ing
- From: dirkgomez
- IE6 Caching and mod_rewrite-ing
- Prev by Date: IE6 Caching and mod_rewrite-ing
- Next by Date: XML problem in ie6 sp1
- Previous by thread: IE6 Caching and mod_rewrite-ing
- Next by thread: XML problem in ie6 sp1
- Index(es):
Loading