[thelist] Netscape... why?

aardvark roselli at earthlink.net
Fri Jun 7 20:14:00 CDT 2002


> From: Erik Mattheis <gozz at gozz.com>
>
> >  > ~ document.write different <link> tags based on
> >  > navigator.userAgent,
> >>  use standard css for a <link> higher on the page, and just let NN
> >>  4.x with JS disabled barf on it --
> >
> >NN4.x won't render CSS with JS disabled...
>
> Meant barf on the the pretty CSS, not page layout.

yes, but that assumes you're using tabled layouts and that you know
how code the page so you don't call an inline bgcolor (attribute, not
CSS) that hides your text, or something else bad...

it also means you're taking an all-or-nothing approach, which can be
completely avoided with either server-side browser detection (which
is only a step above client-side, IMO), or, essentially capability
testing by using @import...

> >but IE without JS enabled will still be penalized...
>
> The strategy is this:
>
> Don't rely on CSS for anything that would make the site unusable
> Put the stuff that will not break in any target browsers in a non
> document.write <link> Lower on the page, deal with problems in target
> browsers and use browser-specific CSS by document.write()ing different
> stylesheets for different browsers.
>
> If you plan it wellt:
>
> - everybody can get the content
> - those w/o JS get a prettier content
> - the amount of control in your target browsers WITH JS is only
> limited by how anal you're willing to be

yes, anyone can get the content (given caveats above), but that still
seems awkward... you take the time to create different CSS files
specific to each browser, but you rely on client-side scripting that
can either be disabled or even misread browsers (spoofing, new
versions, etc.)...

if you plan it "more" well, you can still leverage *all* that custom
CSS without the need for JS, and (more likely than not), without any
CSS or HTML hacks...

i consider creating a valid page and then writing HTML into it via JS
a hack (moreso if you're writing in invalid HTML)...

that's mostly a personal preference, but it also eases maintenance
and compatibility...

> >i think using document.write penalizes your non-JS user
> >unecessarily... after all, if you're taking the time to serve
> >different CSS for people, why not support 'em all?
>
> My response to that is that turning off JavaScript unnecessarily
> penalizes the browser! Whenever JS is turned off, someone has
> intentionally handicapped the browser, and I don't have a problem if
> my pages don't look as pretty as they would with JS on.

my response to that response is that turning off JS doesn't penalize
me at all... it penalizes some sites that don't let me use their nav
(but i just go elsewhere), it prevents the hassle of banner windows,
it speeds up my system, and for IE/win, it prevents many security
issues...

IOW, it doesn't handicap me, it empowers me...  and sites that treat
my browser like a red-headed stepchild get summarily bozo-filtered...
don't believe me?  look at all the stuff i've bought online -- it all
came from sites that work without JS enabled...

> And really, there are things that you _have_ to serve different stuff
> ... either with JS or a cookie as you suggest in your fine article. --

which one?  my latest?

yes, cookies are needed to save custom styles, but no client-side
script... i wrote the article because i see so many people struggle
unnecessarily with JS style switchers, and they are useless to me
without JS...

i don't see how cookies matter here, though, especially since my
article is a tutorial for something that requires cookies by its very
nature... kinda like my article on detecting screen stats and window
sizes...

CSS, however, should not require JS to be enabled... there's no good
reason those two should be inextricably linked, and to require it is
forcing something down a user's throat they don't need, only because
it's more convenient for the developer...

--
Read the evolt.org case study
Usability: The Site Speaks for Itself
http://amazon.com/exec/obidos/ASIN/1904151035/evoltorg
ISBN: 1904151035





More information about the thelist mailing list