browser sniffer

Discussion in 'HTML' started by Paul Watt, Jul 6, 2005.

  1. Paul Watt

    Paul Watt Guest

    Hi,
    Could anyone recomend a browser sniffer that will differentiate
    between IE and pretty much anything else then load a CSS file
    according to hat browser the user is using?

    Cheers

    Paul
    Paul Watt, Jul 6, 2005
    #1
    1. Advertising

  2. Paul Watt

    Chris Hope Guest

    Chris Hope, Jul 6, 2005
    #2
    1. Advertising

  3. Paul Watt

    Els Guest

    Paul Watt wrote:

    > Hi,
    > Could anyone recomend a browser sniffer that will differentiate
    > between IE and pretty much anything else then load a CSS file
    > according to hat browser the user is using?


    Any sniffer would fail when I use Opera identifying as IE, or if I
    just alter the user agent string in a Gecko browser to be the same as
    IE.

    I think you're better off making individual styles (un)readable by
    different browsers. For instance: if you don't want IE to see the
    styles for div.someclass,
    You can write it like:
    body>div.someclass{}
    (also not seen by NN4, and Icab2)

    More info on hacks like that:
    http://centricle.com/ref/css/filters/

    --
    Els http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
    Els, Jul 6, 2005
    #3
  4. Paul Watt

    C A Upsdell Guest

    Els wrote:
    >>Could anyone recomend a browser sniffer that will differentiate
    >>between IE and pretty much anything else then load a CSS file
    >>according to hat browser the user is using?

    >
    > Any sniffer would fail when I use Opera identifying as IE ...


    No. Even when Opera is configured to identify itself as IE, the
    userAgent string still contains the word 'Opera'. Only a sloppy sniffer
    would fail.
    C A Upsdell, Jul 6, 2005
    #4
  5. Paul Watt

    Els Guest

    C A Upsdell wrote:

    > Els wrote:
    >>>Could anyone recomend a browser sniffer that will differentiate
    >>>between IE and pretty much anything else then load a CSS file
    >>>according to hat browser the user is using?

    >>
    >> Any sniffer would fail when I use Opera identifying as IE ...

    >
    > No. Even when Opera is configured to identify itself as IE, the
    > userAgent string still contains the word 'Opera'. Only a sloppy sniffer
    > would fail.


    I knew it! <g>
    Which is why I continued that sentence with "or" ...
    (yes I should have been more specific ;-))

    --
    Els http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
    Now playing: Sweet - Hell Raiser
    Els, Jul 6, 2005
    #5
  6. Writing in news:alt.html,alt.www.webmaster
    From the safety of the cafeteria
    C A Upsdell <""cupsdellXXX"@-@"> said:

    > ...
    > Only a sloppy sniffer would fail.


    The mind bogles at the very thought of a sniffer having the
    attribute:sloppy and the implication therefore that there are sniffers
    that do not.

    --
    William Tasso
    William Tasso, Jul 6, 2005
    #6
  7. Paul Watt

    Spartanicus Guest

    C A Upsdell <""cupsdellXXX\"@-@"> wrote:

    >> Any sniffer would fail when I use Opera identifying as IE ...

    >
    >No. Even when Opera is configured to identify itself as IE, the
    >userAgent string still contains the word 'Opera'.


    Opera 8 has a stealth mode to get around outdated and malicious
    sniffers, in that mode it's UA string is identical to that of the
    browser being spoofed.

    --
    Spartanicus
    Spartanicus, Jul 6, 2005
    #7
  8. Paul Watt

    C A Upsdell Guest

    Spartanicus wrote:
    > C A Upsdell <""cupsdellXXX\"@-@"> wrote:
    >
    >
    >>>Any sniffer would fail when I use Opera identifying as IE ...

    >>
    >>No. Even when Opera is configured to identify itself as IE, the
    >>userAgent string still contains the word 'Opera'.

    >
    >
    > Opera 8 has a stealth mode to get around outdated and malicious
    > sniffers, in that mode it's UA string is identical to that of the
    > browser being spoofed.


    How is this done? I can't find it under any Opera 8 preferences;
    searching for 'stealth' under Opera Help reveals nothing; and examining
    Opera's info re userAgent strings reveals nothing.
    C A Upsdell, Jul 6, 2005
    #8
  9. Paul Watt

    Spartanicus Guest

    C A Upsdell <""cupsdellXXX\"@-@"> wrote:

    >> Opera 8 has a stealth mode to get around outdated and malicious
    >> sniffers, in that mode it's UA string is identical to that of the
    >> browser being spoofed.

    >
    >How is this done? I can't find it under any Opera 8 preferences;
    >searching for 'stealth' under Opera Help reveals nothing; and examining
    >Opera's info re userAgent strings reveals nothing.


    It's controlled via ua.ini (IIRC). Opera 8 by default once a week checks
    if a new version of the browser is available. At the same time it
    downloads an updated version of this ua.ini file. The file controls
    which UA string is sent to which site, it is maintained by Opera
    Software so that users don't have to mess with it themselves and because
    making stealth mode easily available to users could result in users
    permanently configuring stealth mode. This would result in Opera showing
    up even less in server logs that it already does, thereby contributing
    to the common "We don't support Opera because it has to small a market
    share" nonsense reply many users get when they complain to a site about
    the site not working in Opera.

    Knowledgable users however can edit the file directly.

    --
    Spartanicus
    Spartanicus, Jul 6, 2005
    #9
  10. Paul Watt

    C A Upsdell Guest

    Spartanicus wrote:
    > C A Upsdell <""cupsdellXXX\"@-@"> wrote:
    >
    >
    >>>Opera 8 has a stealth mode to get around outdated and malicious
    >>>sniffers, in that mode it's UA string is identical to that of the
    >>>browser being spoofed.

    >>
    >>How is this done? I can't find it under any Opera 8 preferences;
    >>searching for 'stealth' under Opera Help reveals nothing; and examining
    >>Opera's info re userAgent strings reveals nothing.

    >
    >
    > It's controlled via ua.ini (IIRC). Opera 8 by default once a week checks
    > if a new version of the browser is available. At the same time it
    > downloads an updated version of this ua.ini file. The file controls
    > which UA string is sent to which site, it is maintained by Opera
    > Software so that users don't have to mess with it themselves and because
    > making stealth mode easily available to users could result in users
    > permanently configuring stealth mode. This would result in Opera showing
    > up even less in server logs that it already does, thereby contributing
    > to the common "We don't support Opera because it has to small a market
    > share" nonsense reply many users get when they complain to a site about
    > the site not working in Opera.
    >
    > Knowledgable users however can edit the file directly.


    Okay, I found some info at the bottom of
    http://www.opera.com/windows/changelogs/800/

    The only thing is, I can't find ua.ini anywhere on my PC, so I wonder if
    this is an Opera 8 feature that was implemented but which is not yet active.
    C A Upsdell, Jul 6, 2005
    #10
  11. Paul Watt

    Spartanicus Guest

    C A Upsdell <""cupsdellXXX\"@-@"> wrote:

    >The only thing is, I can't find ua.ini anywhere on my PC, so I wonder if
    >this is an Opera 8 feature that was implemented but which is not yet active.


    I don't use the feature myself and I have Opera configured not to
    perform the automatic update checks.

    Afaik it is active, but the ua.ini file is not installed by default.
    Afaik it will only be present when Opera has performed one of it's
    weekly update checks, or after a manual update check from the Help menu.

    --
    Spartanicus
    Spartanicus, Jul 6, 2005
    #11
  12. Paul Watt

    C A Upsdell Guest

    Spartanicus wrote:
    > C A Upsdell <""cupsdellXXX\"@-@"> wrote:
    >
    >>The only thing is, I can't find ua.ini anywhere on my PC, so I wonder if
    >>this is an Opera 8 feature that was implemented but which is not yet active.

    >
    > I don't use the feature myself and I have Opera configured not to
    > perform the automatic update checks.
    >
    > Afaik it is active, but the ua.ini file is not installed by default.
    > Afaik it will only be present when Opera has performed one of it's
    > weekly update checks, or after a manual update check from the Help menu.


    Well, I've done both, and no ua.ini appeared.

    With regard to browser sniffing, I wonder how relevant ua.ini is: it
    should only list sites which don't work without browser spoofing, which
    should only happen with sites which have sloppy browser sniffers; a
    well-written browser sniffer should therefore not be affected by ua.ini.

    Of course there is the larger issue of whether browser sniffing is
    appropriate for dealing with browser differences, especially given that
    there are alternatives, e.g. object detection, and CSS trickery. But
    this is not an issue I will address, as it has been addressed umpteen
    times, and there is no point on rehashing this issue all over again.
    C A Upsdell, Jul 7, 2005
    #12
  13. Paul Watt

    dorayme Guest

    dorayme, Jul 7, 2005
    #13
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGF2aWQgQmFrZXI=?=

    Creating browser sniffer with ASP.Net

    =?Utf-8?B?RGF2aWQgQmFrZXI=?=, May 3, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    3,094
    =?Utf-8?B?RGF2aWQgQmFrZXI=?=
    May 3, 2004
  2. dex

    packet sniffer

    dex, Apr 8, 2005, in forum: Java
    Replies:
    0
    Views:
    419
  3. AMC
    Replies:
    12
    Views:
    361
    Roland Hall
    Jan 13, 2005
  4. AMC
    Replies:
    13
    Views:
    281
    Adrienne
    Jan 17, 2005
  5. Javascript Browser Sniffer

    , Apr 11, 2006, in forum: Javascript
    Replies:
    4
    Views:
    139
Loading...

Share This Page