Welcome to WebmasterWorld Guest from 54.90.204.233

Forum Moderators: open

Message Too Old, No Replies

Opera gets served different page depending on how it IDs itself

     
12:13 am on Nov 22, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 27, 2003
posts:664
votes: 0


There was a side-line discussion happening on this issue in this thread:
[webmasterworld.com...]

I thought I'd continue it in a new thread as it was becoming a bit off topic of the original thread.

Here is a summary of the discussion:

ShawnR:

Opera identifies itself as different browsers, depending on how you configure it, but that does not affect how it displays the site, nor does it affect what the server serves if the server is serving a static site.

Sinner_G:

Shawn, go to Zeal for example with Opera ID'ed as Opera and then as IE, there is quite a difference.

ShawnR:

Yes, my point exactly. Zeal serves one version of the site for IE browsers and another version for Opera browsers. The difference you see is not because of Opera interpreting it one way or another depending on the mode it is set to. The difference is because the website is serving Opera a different version of the html depending on what it is set to. Given a particular version (i.e. a static site), opera will display it the same, irrespective of the reporting mode it is set to.

Sinner_G:

If I get you right, the server gives me another version of the page based on the user agent?
Then what sense does it make to serve Opera a version it can display correctly only when it ID'es as IE?
12:17 am on Nov 22, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 27, 2003
posts:664
votes: 0


If I get you right, the server gives me another version of the page based on the user agent?

Exactly right. Just do a show source, and you will see that the page served differs by one line, that line being the line which includes the css file

Then what sense does it make to serve Opera a version it can display correctly only when it ID'es as IE?
It makes no sense. The site is poor in its cross-browser compatibility. It does not display correctly when ID'ed as IE. The menu choices which can be seen when viewing with IE are missing when viewing with Opera set to ID as IE (should be white on blue background)
12:20 am on Nov 22, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 16, 2002
posts:2010
votes: 0


I am not sure if this helps, but "window.opera" (javascript) will always detect true if you are in opera, no matter what the emulation.
4:56 pm on Nov 22, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
posts:6807
votes: 0


Opera also handles JavaScript differently if ID'd as IE.

Especially if the ifs are in the wrong order...

if(document.all) {}
else if(document.getElemenetById) {}

That can cause problems, depending on the code...

7:29 am on Nov 24, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 27, 2002
posts:959
votes: 0


Good thinking to make a new thread, ShawnR.

I'm still a bit confused, though. Is there any difference in how Opera interpretes styles based on how I tell it to ID? In other words, is the only difference the ID 'spoofing' makes that it takes different styles when those are attributed by user agent?

9:16 am on Nov 24, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 27, 2003
posts:664
votes: 0


Using server-side scripting or configuration of the webserver, the webserver could be configured to serve different pages depending on what the user agent ID'ed as. In the example of Zeal, the only difference I could see was the line which included the style sheet, but other sites may show completely different pages. Also, if the only difference is the style sheet, then there are better ways to handle that (search for 'css hacks').

Given a particular html page, I don't think the ID setting makes any difference in how Opera displays that page. Of course, the exception to that is if the page itself has Javascript which tests for the browser type and displays differently according to the browser.

Hey, but don't take my confident authoritative tone as anything but stupid arrogance. This is just my opinion. I think I am right. But then again I normally think I am right ;)