ot: please test my experimental site

P

picayunish

Hywel said:
There's not JavaScript on that page. What is it supposed to do?

I have used a server side script to activate a style sheet for e.g. IE,
Gecko base or other browsers.
I have the page tested on a Windows machine.
My question is does the page work on a Mac?
 
S

Spartanicus

picayunish said:
I have made a page with a browser detection (no cookies) to activate the
right style sheet.

It appears to use User Agent sniffing and consequently it fails, I get
other.css using Mozilla.

My UA string: "Code to W3C standards and stop that idiotic browser
sniffing (My OS; U) [en]"

Ps, there's a hint in that string.
 
P

picayunish

Spartanicus schreef:
picayunish wrote:




It appears to use User Agent sniffing and consequently it fails, I get
other.css using Mozilla.

Yes, I use User Agent sniffering.
If you mean it fails, when using Mozilla / Firebird and set the UA
switch as Opera. Then you get other.css ?

When you have UA set as IE, you get ie.css
When you have UA set as Netscape or Mozilla, you get gecko.css
"... stop that idiotic browser sniffing ..."

Why stop sniffering?
I'm trying to understand what sniffering is and how to use a server side
script for the sniffering instead of using that *bloody Cookies*.

Me I experiment with sniffering to learn or may I not develop my skills.
 
P

picayunish

Spartanicus said:
picayunish wrote:




It appears to use User Agent sniffing and consequently it fails, I get
other.css using Mozilla.

When using Opera you get other.css
The other browser the UA detection works perfectly.
 
S

Spartanicus

picayunish said:
When using Opera you get other.css
The other browser the UA detection works perfectly.

It breaks ridiculously easily.

There is no need to serve different style sheets, there are well known
hacks to hide css from NS4 and IE if needed, as a last resort you could
resort to using conditional comments for IE.
 
P

picayunish

Spartanicus said:
picayunish wrote:




It breaks ridiculously easily.

There is no need to serve different style sheets, there are well known
hacks to hide css from NS4 and IE if needed, as a last resort you could
resort to using conditional comments for IE.

I know that there are hack to hide css from NS4 and IE.
But what I really wanted is that different presentation of the page for
each browser. The positioning of the lay-out are common.
That's why I thought about detection of the browser.
On the page there will be alternative style sheet, by changing the style
sheet in the style option of the browser or by changing on the page it self.
 
?

=?ISO-8859-1?Q?Fran=E7ois_de_Dardel?=

picayunish said:
Good day,
I have made a page with a browser detection (no cookies) to activate the
right style sheet.
Can somebody test my experimental page on a mac?
http://www.evandervaart.nl/test.php
And tell my what kind of style sheet you see?

On Safari and Netscape 7 (Mac) I see the links in red, meaning that the
stylesheet (gecko.css) does work.
 
P

picayunish

François de Dardel said:
On Safari and Netscape 7 (Mac) I see the links in red, meaning that the
stylesheet (gecko.css) does work.

Tanks François de Dardel.
Now I know that the script works :) on a Mac.
 
S

Spartanicus

picayunish said:
I know that there are hack to hide css from NS4 and IE.
But what I really wanted is that different presentation of the page for
each browser.
Why?

The positioning of the lay-out are common.
That's why I thought about detection of the browser.

It doesn't work anywhere near reliably, why implement something that
breaks so easily?
 
P

picayunish

Spartanicus said:
picayunish wrote:



Why?

Because I gone use e.g. Comic MS as font for IE, Isabella for NS, etc.
Is there a hack to hide css for all Opera versions?

It doesn't work anywhere near reliably, why implement something that
breaks so easily?

Why not?
Because you can break it easily by using an other UA then the original
UA of the browser (standard UA).
Why did you have set Opera UA in a Mozilla browser?
Do you hate browser sniffering, cookies and JavaScripts?
 
S

Spartanicus

picayunish said:
Because I gone use e.g. Comic MS as font for IE, Isabella for NS, etc.
Why?

Is there a hack to hide css for all Opera versions?
Why?


Why not?

Because there are better methods to do this in the unlikely event that
you have a valid reason to do what you want.
Because you can break it easily by using an other UA then the original
UA of the browser (standard UA).
Why did you have set Opera UA in a Mozilla browser?

I didn't, I said that I got other.css with Mozilla, the word Opera
doesn't appear anywhere in my UA string. It's a demonstration that your
method doesn't work.
 
P

picayunish

Spartanicus said:

Why does bananas grows on trees?
Why does men say a banana-tree instead of banana-brush?
Because there are better methods to do this in the unlikely event that
you have a valid reason to do what you want.




I didn't, I said that I got other.css with Mozilla, the word Opera
doesn't appear anywhere in my UA string. It's a demonstration that your
method doesn't work.

That's strange, because I tested with Firebird and I get gecko.css when
I have set the UA as Mozilla, Netscape or as default.
I even tested with Opera and set the UA as Moz 3.0, Moz 4.8, IE 6.0 or
as default the script works perfectly.
I.m.o the script isn't broken.

Did you or didn't visited the page?
 
S

Spartanicus

picayunish said:
Why does bananas grows on trees?
Why does men say a banana-tree instead of banana-brush?

Excuse me while I pull out of this thread, I'm having difficulty
stooping to your level. Please don't alter your nick until you get a
clue about authoring for the web.
 
P

picayunish

Spartanicus said:

Because this is my last phase of changing style sheet.
Everybody knows an alternative style sheet, you can select a different
style sheet with "use style" in NS or "style" in Moz/Firebird.

This can also be done with a javascript or server side script. When
clicking on a link you can change the style sheet from e.g. standard
(default of the page) into an other. An example page at
http://www.goddamn.co.uk/tobyink/

So my last phase of learning how to set the style sheet for each browser
type by detecting the kind of browser the visitor have. I also consider
to use alternative style sheet so that the visitor can change the style
sheet if he/she wants to.
Also I wanted to know if UA detection works.
 
K

kchayka

picayunish said:
I tested with Firebird and I get gecko.css when
I have set the UA as Mozilla, Netscape or as default.

Here is my Firebird UA string:
Mozilla/x (MyOS; MyBrowserIsMyBusiness) YouDontNeedToKnow 1.0

This ended up with other.css. If I change the Firebird UA to look like
some flavor of IE, gets ie.css. Shouldn't it always get gecko.css?

Consider for a moment that someone who changes their UA string will
probably make it look like a different browser altogether, not just
another variation of the same browser. Folks often do this precisely
because of the type of browser sniffing you are attempting. Clueless
authors look for a very limited number of browsers, when it comes across
anything else the script will likely do something undesireable.
I even tested with Opera and set the UA as Moz 3.0, Moz 4.8, IE 6.0 or
as default the script works perfectly.

It works perfectly if you believe what the UA string tells you. The
problem is that the UA may lie. My Opera identifying as IE gets ie.css.
This is probably wrong. Netscape 4.x getting a gecko.css is probably
wrong, too.
I.m.o the script isn't broken.

If your goal is just to parse the UA string, it isn't broken. If your
goal is to identify the actual browser, then it is indeed broken.
 
P

picayunish

kchayka wrote:

[snip]
If your goal is just to parse the UA string, it isn't broken. If your
goal is to identify the actual browser, then it is indeed broken.

My goal isn't to identify the actual browser.
 
K

kchayka

picayunish said:
My goal isn't to identify the actual browser.

Then it doesn't make any sense to use a browser-specific stylesheet.
CSS that "works" for one browser may not in another. I didn't look at
the actual code in any of those stylesheets, but if there are any
platform-specific or browser-specific property values based on what the
UA string claims it is, you are going down the wrong path.

If the UA lies about what it is, what are you really achieving?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top