Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As already asked in a comment: why do you want this? Browser sniffing is a bad habit and there are only a few situations where it is needed.</p> <p>Instead, use feature detection. As <a href="http://www.nczonline.net/blog/2009/12/29/feature-detection-is-not-browser-detection/" rel="nofollow noreferrer"><strong>described by Nicholas Zakas</strong></a>, you should test relatively 'uncommon' features before using them and only rely on these tests, so you're kind of fail-safe. For example, do</p> <pre><code>if (window.XMLHttpRequest) var xhr = new XMLHttpRequest(); </code></pre> <p>instead of</p> <pre><code>if ((brwsr.IE &amp;&amp; brwsr.IE.version &gt;= 7) || (brwsr.firefox) || (brwsr.opera)) var xhr = new XMLHttpRequest(); </code></pre> <p>And also <strong>don't</strong> do</p> <pre><code>if (window.XMLHttpRequest) // Hey, native XMLHttpRequest-support, so position: fixed is also supported </code></pre> <p>(instead, test if <code>position: fixed</code> is supported)</p> <p>There exist several uncommon browsers with names like <a href="http://en.wikipedia.org/wiki/Kazehakase" rel="nofollow noreferrer">Kazehakase</a> and <a href="http://en.wikipedia.org/wiki/Midori_%28web_browser%29" rel="nofollow noreferrer">Midori</a> that also might, or might not, support these features, so your scripts will silently work on them when using feature detection.</p> <p>But please read the <a href="http://www.nczonline.net/blog/2009/12/29/feature-detection-is-not-browser-detection/" rel="nofollow noreferrer"><strong>mentioned article</strong></a>, as it contains a very good and thorough explanation of this technique. (By the way, I think that Zakas' <a href="http://rads.stackoverflow.com/amzn/click/047022780X" rel="nofollow noreferrer"><em>Professional JavaScript for Web Developers</em></a> is still too unknown.)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload