[thelist] Optimising code by UA vs. Proxy caches - week 2 (was server-side browser-sniffing a bad idea?)
Erik Mattheis
gozz at gozz.com
Mon Dec 10 22:13:40 CST 2001
> > Questions remaining...
>>
>> 1) does simply adding the date/time to the query-string force the
>> request to go all the way to the server (i.e. will it succeed in
> > bypassing the proxy-cache)?
That's the only surefire way to go.
The last site I did I document.write a different stylesheet for NN ...
<script language="JavaScript">
if (navigator.userAgent.indexOf('Mozilla') > -1 &&
navigator.userAgent.indexOf('MSIE') == -1) {
document.write('<link rel="stylesheet" href="/styles_ns.css" />');
}
else {
document.write('<link rel="stylesheet" href="/styles.css" />');
}
</script>
Works fine ... another unintentional advantage is that a visually
impared user complained that they couldn't change the size of the
text (stylesheets use px) ... so they can just turn JavaScript off
and get no stytlesheet.
--
__________________________________________
- Erik Mattheis
(612) 377 2272
http://goZz.com/
__________________________________________
More information about the thelist
mailing list