jQuery badBrowser Update Version 1.4

Time is running …

Hello!

Today you can download my new version from “jQuery badBrowser Script” . Why and how it works you can read in my last articles:

After several comments to the missing MSIE 5.5 detecting i decided to update my script and tell you my solution:

I have tested several ways to use JavaCcript/jQuery and useragent identification.

// special Testcheck for dirty Microsoft Internet Explorer 5.5
 if (userAgent.indexOf("MSIE 5.")>=0) {
 return true;
 }

Nothing happens.  Mostly the Browser doesn’t work with JavaScript or displays many errors.
MSIE 5.5 is very old and in my opinion it’s enough to detect IE 6.0. In special cases you may use conditional comments like this:

<head>
 <!--[if lte IE 5]>
 <style> body {background:yellow;}</style>
 <![endif]-->
</head>

The actually jQuery library is 1.4.2, since version 1.3 the jquery.browser command is deprecated, but on the website you can read:

The $.browser property is deprecated in jQuery 1.3, but there are no immediate plans to remove it.

My small Changelog:

  • update the browser version support, alert if smaller then:
    • Firefox < 3 .0
    • Opera < 9.5
    • Safari < 4.0
    • Google Chrome < 3.0
    • MSIE < 8.0
  • German warning language


Please comment this Post for hints, tricks and more … have fun!

badBrowser Version 1.4 ( 1107x )

UPDATE 19.05.2010: Now you can also find a minimized .js Version in the download-zip (Thanks to fleshgrinder). Nice javascript compression tool.

Related posts:

  1. Fight old Browsers – Warning with jQuery
  2. Release: bad Browser – new Version 1.3
  3. How to … update TYPO3 4.2
  4. How to code a jQuery slider menu
  5. Fight old Browsers – YouTube follows
  6. new Aptana version 1.5
  7. TYPO3 Version 4.4.0 released
  8. fight Internet Explorer 6 – reloaded

11 Responses to “jQuery badBrowser Update Version 1.4”


  1. 1 Alan

    I found another solution before http://browser-update.org, but this is better and feel tiny file size.

    may be can combine the getbrowser script to be more powerful to modify browser version.

    whatever thanks so much for this pretty code.

  2. 2 blumentritt

    Thanks Alan!

    You are right, the browser-update.org is really comfortable!
    Maybe i “copy” this “click and go” event, but actually there is no time … :-)

    Greetz! Martin

  3. 3 Josh

    Is there a link to an English version? The link takes me to the _de version.

  4. 4 blumentritt

    Hi Josh,
    actually the version 1.4 is only in german. But the language-part is less then 100 characters … hopefully i will do this after holiday … or you can do it?! :-)

  5. 5 Konevoz

    Hi,

    i guess i found a bug with close button and cookie set. It does not work and the message always show. So i added days number to the function on the end of the code and it works now:

    setBadBrowser(‘browserWarning’,'seen’,7);

    Am i right:)
    PS: Nice work! :)

  6. 6 Andy

    The latest version of Chrome is 10, this script just takes a single char from the string so fails after version 9. Replace this:

    var snip1 = chrome+7;
    var version = userAgent.substring(snip1, (snip1+1));

    With this:

    var snip1 = chrome+7;
    snip2 = userAgent.indexOf(“.”,snip1);
    var version = userAgent.substring(snip1, snip2);

    Andy

  7. 7 George

    @Andy thank you so much for that patch! Noticed this today after updating Chrome to v10, and was happy to find your fix so fast. Cheers to you and blumentritt for the original script!

  8. 8 blumentritt

    Hi,
    thank you @all for feedback and patches. currently i have no time to patch my (old) script – please be patient. i have several updates (in my mind) and hope to find some hours to update the badBrowser Script (-> version 2.0!!!)

    keep on posting.
    martin

  9. 9 Sebi

    Googlebot (which generates the preview images of webpages) is also recognized as a bad browser. The preview images all contain the bad browser warning.
    Example (first search result):
    http://www.google.de/search?q=eventpeppers

    Are there any plans for fixing this?

  10. 10 Mike Pin

    @Andi

    after changing:

    var snip1 = chrome+7;
    var version = userAgent.substring(snip1, (snip1+1));

    with:

    var snip1 = chrome+7;
    snip2 = userAgent.indexOf(“.”,snip1);
    var version = userAgent.substring(snip1, snip2);

    the script works just for ie7. in ie6 nothing happends. why?

    btw: 10x for the script :)

  1. 1 Fight old Browsers – Warning with jQuery at fragmente

Leave a Reply

*