TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [TCLUG:16337] CSS and all that (was Personal Request..)
> I'm not a big fan of JavaScript. It tends to fail in strange
> and usual ways, and causes no end of problems. For image
> rollovers, it is great, but not for much else...
>
> These days, the way to go is to use PHP. PHP can detect the browser,
> and then you can choose to dish out pages based on that. You both
> cut down on the amount of data the end user has to download (because
> there isn't 2x the HTML, one for IE, one for Netscape, in the Javascript),
> and you have to worry less about unusual client configurations.
I think both have their place. I use Apache SSI about 90% of the time, because
for the most part, all I need are things like virtual includes & simple
if/then/else type processing. Mod_perl and PHP are both great for more complex
tasks, especially anything where I actually want to collect data from the user,
but I wouldn't use either one just to customize a page format (unless it was
something *really* complex).
The advantage with JavaScript for formatting is that you don't have to rely on
browser detection (which is often useless -- for example, all versions of IE
post 4.0, including 5, report their version number as "4"). You can detect
whether the page being viewed has image, form, or other types of elements,
whether or not it's encapsulated in frames, and all sorts of fascinating
client-side info that isn't contained in the HTTP request info.
--
Eric Hillman
UNIX Sysadmin/Webmaster
City & County Credit Union
ehillman@cccu.com