Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

IE already has a solution.

Compatibility mode.



How do you propose that would work? The problem is that scripts detect Opera as version 1, not 10, and then failing - "if digit 1 of version < 4 then fail". To the browser, the looks like (and IS) the expected behaviour, so there no not-horribly-broken automatic fallback.

In a way this solution is compatibility mode. "Broken" detection scripts see version nine (which is good enough), scripts that know about Opera 10 sees version 10.


If you mean compatibility view in IE8 :http://blogs.msdn.com/ie/archive/2008/08/27/introducing-comp... then I'll have to agree that it would be better to handle the problem the same way (a button which would send a different UA string).

Think about the people who have to deal with the UA string for legitimate reasons (analytics...) they will have to deal with a special case (if (UA == "Opera/9.80...")).

It's seems a bit like a ugly hack to me.


IE compatibility mode is broken. It has two "modes", one of which changes the user agent version and one that doesn't (but still changes the functionality of the browser). Guess where the sniffer scripts get the version from.

The only way to make it work reliably is to look at the window.documentMode property which requires changing your code, thus defeating the point of the compatibility mode in the first place.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: