473,388 Members | 1,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Detecting non-css intellegent browsers

ima
I've been studying a great book on css and now that I've put together a
few pages using it, I'm finding out that my book needed one more very
important chapter. Introducing css in the real world. Obviously,
there are a LOT of older browsers still out there that don't support
css and some newer one's that still don't support it very well.
Knowing that, I have prepared a second set of pages using table layouts
for those browsers. It would have been VERY helpful to know how to
detect which browsers were css intelligent or even which were not.

Can anyone here please enlighten me or give me a reference to go in
search of? I've been told it is not enough to be able to detect
browser and version. It's been suggested that I need to test for css
enabled and perhaps there's other things to be considered. Any help
would be sincerely appreciated.

Sep 3 '05 #1
13 1774
Els
ima wrote:
I've been studying a great book on css and now that I've put together a
few pages using it, I'm finding out that my book needed one more very
important chapter. Introducing css in the real world. Obviously,
there are a LOT of older browsers still out there that don't support
css and some newer one's that still don't support it very well.
Knowing that, I have prepared a second set of pages using table layouts
for those browsers. It would have been VERY helpful to know how to
detect which browsers were css intelligent or even which were not.

Can anyone here please enlighten me or give me a reference to go in
search of? I've been told it is not enough to be able to detect
browser and version. It's been suggested that I need to test for css
enabled and perhaps there's other things to be considered. Any help
would be sincerely appreciated.


My honest opinion:
Throw out these table layout pages.
Upload the CSS based pages.
Give us a URL, and state which problems you are encountering in which
browsers, and you got a fair chance you'll learn a few small tricks
and get your pages all working without a table.

That is, based on the assumption your CSS based pages already are
working well in some browser, and based on your information this is
probably Firefox or Opera.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Dave Edmunds - The Wanderer
Sep 3 '05 #2
ima wrote:
there are a LOT of older browsers still out there that don't support
css and some newer one's that still don't support it very well.
Knowing that, I have prepared a second set of pages using table layouts
for those browsers. It would have been VERY helpful to know how to
detect which browsers were css intelligent or even which were not.

A very bad plan.
Browser sniffing fails to correctly identify many browsers, modern or
otherwise. Search the web for numerous articles why this is so.
It is possible to create web pages that degrade gracefully for old or
defective browsers.
Do as Els suggests.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Sep 3 '05 #3
ima wrote:
I've been studying a great book on css and now that I've put together a
few pages using it, I'm finding out that my book needed one more very
important chapter. Introducing css in the real world. Obviously,
there are a LOT of older browsers still out there that don't support
css
As a proportion of traffic on the web - not really. Smaller still when you
consider that users of such browsers will probably be happy they can get to
the content in the first place. Even smaller if you don't count those user
agents for which a table based layout is worse then sensible markup.
and some newer one's that still don't support it very well.
This comes down to learning the bugs in the common ones you care about an
implementing work arounds. For most people that means MSIE 6, and perhaps
5.x.
Knowing that, I have prepared a second set of pages using table layouts
for those browsers.
Waste of time.
It would have been VERY helpful to know how to
detect which browsers were css intelligent or even which were not.


http://www.greytower.net/archive/art...customcss.html

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Sep 3 '05 #4
ima
OK.. I'm sensing a uniform impression from this group, that my
inexperience was leading me in the wrong direction for a solution.

I have only a few browsers installed for testing and (to my current
knowledge) my biggest problem is with Netscape 4 (which is also the
oldest of my browser selection). I've done some research and I know
that N4 does have some CSS support (if somewhat limited). I don't a
version of IE prior to 6 so I suspect IE5 and earlier probably have
even more problems but I have no way to see them.

The CSS book that I've been studying, ends with an example of a 3
column layout which I've been trying to adapt my own pages to. This
layout tests fairly well for my other browser resources but it displays
as a jumbled mess with Netscape 4. At first I thought perhaps it was
an error somewhere in my code (and that may still be the case) but I've
downloaded the online example from the book and the other's example
doesn't work with N4 either but it seems to be a different problem.
The example page starts to load and gets *maybe* a third of the way
down the page and then freezes with the right column nowhere in sight
and the parts of the footer text displayed in the center of the window.
I've tried contacting the author but no replies yet. I've temporarily
uploaded a copy of the example to the link below in case any of you
here can spot the problem(s) and suggest a way to work N4 around it.

Your wisdom, time and effort are all greatly appreciated.

http://www.nwlink.com/~jac

Sep 5 '05 #5
ima wrote:
OK.. I'm sensing a uniform impression from this group, that my
inexperience was leading me in the wrong direction for a solution.

I have only a few browsers installed for testing and (to my current
knowledge) my biggest problem is with Netscape 4 (which is also the
oldest of my browser selection). I've done some research and I know
that N4 does have some CSS support (if somewhat limited). I don't a
version of IE prior to 6 so I suspect IE5 and earlier probably have
even more problems but I have no way to see them.
Make sure you test with Opera 7.54, Opera 8.02, Mozilla 1.4, and Mozilla
1.7.11.

You can (sort of) install older versions of IE on your Windows PC, at
least well enough for testing. In addition to 6.0 I have 5.01 and 5.5.
See http://labs.insert-title.com/labs/article795.aspx
The CSS book that I've been studying, ends with an example of a 3
column layout which I've been trying to adapt my own pages to. This
layout tests fairly well for my other browser resources but it displays
as a jumbled mess with Netscape 4.
How important is NN4 to you? Do you really have enough visitors to
fully support it?
At first I thought perhaps it was
an error somewhere in my code (and that may still be the case) but I've
downloaded the online example from the book and the other's example
doesn't work with N4 either but it seems to be a different problem.
The example page starts to load and gets *maybe* a third of the way
down the page and then freezes with the right column nowhere in sight
and the parts of the footer text displayed in the center of the window.


One of the problems with NN4 is that there were a lot of versions, and
each had its own set of problems. This made testing problematical: one
could not possibly test with all the versions, so one had to test with
the more common versions, which I believe today comprises NN4.08,
NN4.79, and NN4.80. If you are going to support NN4, these are the
versions you should target.

I trust that you know how to hide CSS from NN4.
Sep 5 '05 #6
ima wrote:
Obviously,
there are a LOT of older browsers still out there that don't support
css


No there aren't. There are very few of them, and even fewer people
using them. There are more _newer_ "browsers" that don't support CSS
and do this deliberately for various reasons (Googlebot might be
regarded as an important example). However the natural behaviour of CSS
is that it's non-harmful if not supported.

Code your pages to work without CSS, and code them so that their
behaviour without CSS is "rational", if not pretty. Then use CSS to
control the layout how you want it. Ignore NS4, it's just too much
trouble to support and simply not worth the effort.

Sep 5 '05 #7

On Mon, 5 Sep 2005, ima wrote:
as a jumbled mess with Netscape 4.


Nowadays, hide most of your CSS from NN4. It's not worth the effort to
/try to do better, as others have already advised you.

As a matter of principle, one should not make web pages which *depend* on
CSS. So, no matter if the cosmetics are poor for them, your (few) NN4
users still get the content, even without the more interesting CSS.

There are some handy web pages about techniques for hiding CSS from
inadequate browser versions (-> google etc.). NN4 would be especially
relevant in this context (for those few still running it).

Anyone who is still running ancient versions of the MS operating system
component that thinks it's a web browser, on the other hand, have far more
serious matters to worry about than mere CSS problems. Their latest
offering isn't without its problems (it's known to still violate several
mandatory requirements of the relevant interworking standards, and that
isn't the only security risk to which it exposes itself and its users),
but at least the current version comes with a ready ongoing supply of
sticky-plaster to fix the more evident security compromises as they get
exploited.
Re: the subject line -- browsers which don't implement CSS at all are
harmless, if you follow the principle of never *relying* on CSS. The
killers are the browsers which attempt CSS but get it sufficiently wrong
to wreck the result: and that's what the CSS hiding techniques are for.
Sep 6 '05 #8
David Dorward wrote:
agents for which a table based layout is worse then sensible markup.


When do tables display worse than "sensible" markup?
Sep 6 '05 #9
Borris <no**@none.com> writes:
David Dorward wrote:
agents for which a table based layout is worse then sensible markup.


When do tables display worse than "sensible" markup?


Any narrow display (mobile phones, PDAs, webTV, graphical browsers at
narrow widths, some text-mode browsers, etc)

If they don't linearise, then add speech browsers, the rest of the
text-mode browsers, and so on into the list.

Data tables should linearise sensibly, and the narrow display problems
are easier for the user to deal with there. Layout tables can cause
entire paragraphs of text

th
at
en
ds
up
wr
it
te
n
li
ke
th
is

in a narrow display, especially if the display can't be scrolled
horizontally.

--
Chris
Sep 6 '05 #10
C A Upsdell > wrote:

One of the problems with NN4 is that there were a lot of versions, and
each had its own set of problems.
As far as CSS goes, there is virtually no difference between various
versions of NS 4.x beyond 4.08.
This made testing problematical: one
could not possibly test with all the versions, so one had to test with
the more common versions, which I believe today comprises NN4.08,
NN4.79, and NN4.80.
The only difference between 4.79 and 4.80 is a security update. It's a
waste of time to test for CSS differences between them. And the
differences from 4.08 aren't enough to bother with.
I trust that you know how to hide CSS from NN4.


That is indeed the best course to take, unless you know for a fact that
you've got a significant number of NS4 users, which is pretty unlikely
these days.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Sep 6 '05 #11
kchayka wrote:
C A Upsdell > wrote:
One of the problems with NN4 is that there were a lot of versions, and
each had its own set of problems.

As far as CSS goes, there is virtually no difference between various
versions of NS 4.x beyond 4.08.


Absolutely untrue! I clearly remember that, when Netscape updated NN4
to fix bugs, it often introduced new bugs, or reintroduced old bugs,
which played havoc with existing pages.
Sep 6 '05 #12
ima wrote:
OK.. I'm sensing a uniform impression from this group, that my
inexperience was leading me in the wrong direction for a solution.

I have only a few browsers installed for testing and (to my current
knowledge) my biggest problem is with Netscape 4 (which is also the
oldest of my browser selection). I've done some research and I know
that N4 does have some CSS support (if somewhat limited). I don't a
version of IE prior to 6 so I suspect IE5 and earlier probably have
even more problems but I have no way to see them.


NN4 is the worst single problem - I gave up working too hard on it some
time ago, and just settle for graceful degradation.

1. (html) Make sure table, tr, th, td are always closed (if you use them
at all) - it's not required, but NN4 can fall in a heap if you don't.
2. Use doctype to get standards mode rather than quirks mode.

3. Hide some or all of your CSS from NN4 (see
http://w3development.de/css/hide_css_from_browsers/ for how).
Have an all_browsers.css, and a not_nn4.css or similar - experiment by
initially putting everything in not_nn4, and moving stuff across.

4. Test - initially on Moz, FF, Opera or similar fairly compliant
browser, then when that works move on to ie6,5.5,5,7 and maybe 4.
It's easier to start from fully compliant, and then add workarounds for
IE oddities. There's supposed to be reliable ways to put multiple
versions of IE on one pc nowadays, but I haven't tried them - I test
from work. Ideally try out on Mac too - Mac IE has different bugs from
WinIE.

Chris
Sep 7 '05 #13

On Tue, 6 Sep 2005, Borris wrote:
David Dorward wrote:
agents for which a table based layout is worse then sensible markup.


When do tables display worse than "sensible" markup?


Try viewing some sites with tables using Lynx especially those
that include <br> in the table cells and center the text.

A Preformatted version of a table:

Features supported by different versions:
Description Versions
Feature 1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3 3.0 3.1 3.2 3.5
Cut and paste N N N N N Y Y Y Y Y Y Y Y
Colour highlighting N N N N N N N N N Y N Y Y
Etc., etc.

A table with centered data in all but the leftmost column and a <br> after
every cell content for spacing as rendered by Lynx:

Features supported by different versions:
Description Versions
Feature
1.0
1.1
1.2
1.3
1.4
2.0
2.1
2.2
2.3
3.0
3.1
3.2
3.5
Cut and paste
N
N
N
N
N
Y
Y
Y
Y
Y
Y
Y
Y
Colour highlighting
N
N
N
N
N
N
N
N
N
Y
N
Y
Y

Etc., etc.

Then there are the tables that do display horizontally (no "<br>") but
use 'Y' for supported features and an empty cell for unsupported so Lynx
displays something like this:

Features supported by different versions:
Description Versions
Feature 1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3 3.0 3.1 3.2 3.5
Cut and paste Y Y Y Y Y Y Y Y
Colour highlighting Y Y Y
Etc., etc.

Sensible markup would list the versions supporting each feature:

Features supported by different versions:
Feature: Versions Supporting it
Cut and paste: Versions 2.0, 2.1, 2.2, 2.3, 3.0, 3.1, 3.2, 3.5
Colour highlighting: Versions 3.0, 3.2, 3.5
Etc., etc.

Which would degrade in Lynx to the following understandable output:

Features supported by different versions:
Feature: Versions Supporting it
Cut and paste: Versions 2.0, 2.1, 2.2, 2.3, 3.0, 3.1, 3.2, 3.5
Colour highlighting: Versions 3.0, 3.2, 3.5
Etc., etc.

To simulate Lynx rendering of a table:

1. Take a table,
2. Change each <table...>...</table> to <p>...</p>
3. Change each </tr><tr...> to <br>
4. Delete the unchanged <tr...> and </tr> at the start and ends of the
table.
5. Change each <td...> and </td> to a space (not an &nbsp; but an
ordinary space subject to whitespace compression).
Now view it and see what you get.

Or...

Lynx has been ported to Windows. Grab a copy from here:
http://www.fdisk.com/doslynx/lynxport.htm

It will also help to give you an idea of how your content is
"seen" by search-engines or by the blind using screen-readers
and speech-synthesizers.

--
``Why don't you find a more appropiate newsgroup to post this tripe into?
This is a meeting place for a totally differnt kind of "vision impairment".
Catch my drift?'' -- "jim" in alt.disability.blind.social regarding an
off-topic religious/political post, March 28, 2005

Sep 16 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Jay | last post by:
I'm sure this is a really dumb question, but how do you detect a variable type in Python? For example, I want to know if the variable "a" is a list of strings or a single string. How do I do...
1
by: Tim Gosselin | last post by:
I am writing a tcp tunnel but cannot find a way of detecting when a socket shuts down its read end without writing to the socket. For testing the write end of the remote endpoint I just do a: if...
5
by: Richard | last post by:
My experience has always been that you're SOL when trying to safely detect and stop references to dangling memory (non-null pointers to free'ed blocks) at runtime (C99, Linux). Maybe somebody...
9
by: Stu | last post by:
I have the following code in a "C" program. test_prog.c main() { while ( fgets ( buffer, sizeof(buffer), stdin) != NULL) { ..... ..... }
7
by: fox | last post by:
Maybe this is not the best group to ask this question, but I don't know a better one. I'm looking for a *portable* program in C (I mean source code) to detect whether unaligned word access is:...
8
by: dagecko | last post by:
Hi I would like to know how to detect if a file is binary or not. It's important for me but I don't know where to start. Ty
7
by: pocmatos | last post by:
Hi all, What the best way to detect under/over flow in a program with a lot of computations? For example: #include <iostream> #include <limits> using namespace std;
8
by: dwelch91 | last post by:
I need to detect whether the operating system I am running on (not the Python version) is 64bit or 32bit. One requirement is that I need to include support for non-Intel/AMD architectures. The 2...
13
by: robert | last post by:
My code does recursion loops through a couple of functions. Due to problematic I/O input this leads sometimes to "endless" recursions and after expensive I/O to the Python recursion exception. What...
9
by: timor.super | last post by:
Hi group, I've written a client/server application, using the dotnet sockets. In my server, I have a thread waiting for messages with : ret = currSocket.Receive(buffer, 1024,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.