Hi! On Tue, Jan 01, 2002 at 01:26:23AM +0800, Stas Bekman wrote: > >>I suppose that we can use a conditional require() for the style sheet in > >>the <head> section and serve a different CSS for older NS. That's > >>possible right? (I didn't do html for a long time) > > Oh is the site going to be dynamic? Different tempaltes for old clients is > > one way to go. > Nope, it's going to be static. You can decide which CSS to fetch at run > time, via require(). I think this has something to do with JS if I'm not > mistaken. So you can check the agent and fetch a proper for this agent > CSS file. I suppose this doesn't contradict with the fact that we don't > want to use JS for usability. This JS should work behind the scenes and > if it's disable or not available the default CSS should be brought in. > I'll leave again to the experts to comment on whether it's going to work. IMO there are two ways of doing this (I did the seconde once..)
1) Put some JS in the HTML to check the browser version and have the JS generate the "require style sheet" part. 2) Generate the CSS dynamically. That is, require something like /cgi-bin/css.pl and have that script return the corresponding style sheet for the requesting client (with Content-type: text/css). The problem here is that each request triggers a CGI process. But it works even if JS is disabled. Maybe one way to get the best result would be to first load a CSS file the normal way. Afterwards have some JS check the browser type and load another CSS file according to the browser type. So if someone with an old browser, but JS enabled views the page, s/he first gets the "standard" CSS file and afterwards the JS-generated browser specific CSS. As the C stands for Cascading, the later loaded CSS file will override the "standard" file, and thus those styles will be applied. If someone with a new browser (i.e. standard compliant) but JS turned off requests a page, s/he gets only the default standard CSS file, which the browser can render. So we don't force users with new browsers to use JS to get the best view of the mod_perl site, AND we can make a nice-looking page for old browser with JS enabled. Old Browsers without JS (or lynx, etc) just get the very basic layout (like http://hank.org/images/style6.png ) But I'd prefer to do this fine-tuning /after/ all current issues (i.e. prev/next and download widget) have been dealt with. -- D_OMM +----> http://domm.zsi.at <-----+ O_xyderkes | neu: Arbeitsplatz | M_echanen | http://domm.zsi.at/d/d162.html | M_asteuei +--------------------------------+ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]