Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5947965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:02:24+00:00 2026-05-22T17:02:24+00:00

I know browsersniffing is not the correct way to design a site for multiple

  • 0

I know browsersniffing is not the correct way to design a site for multiple browsers. My question however is not related to designing a site which behaves well for each browser.

I want to offer the user the ability to install the site as a webapp if the browser is Google Chrome or Firefox 4+, as a widget if it’s Opera, as an extension if it’s Safari… and so on

Basically I want to slide in a div with a button offering this kind of install. There is no use showing the webapp solution if the browser is for example Safari as Safari has no support for it.

So how do I do this in a good way?

I found this based on features rather than useragent

Safe feature-based way for detecting Google Chrome with Javascript?

var is = {
  ff: window.globalStorage,
  ie: document.all && !window.opera,
  ie6: !window.XMLHttpRequest,
  ie7: document.all && window.XMLHttpRequest && !XDomainRequest && !window.opera,
  ie8: document.documentMode==8,
  opera: Boolean(window.opera),
  chrome: Boolean(window.chrome),
  safari: window.getComputedStyle && !window.globalStorage && !window.opera
}

It seems to work for my needs and is short and not bulky and more or less spoof safe

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:02:24+00:00Added an answer on May 22, 2026 at 5:02 pm

    Take a look at jQuery.browser: http://api.jquery.com/jQuery.browser/

    The $.browser property provides
    information about the web browser that
    is accessing the page, as reported by
    the browser itself. It contains flags
    for each of the four most prevalent
    browser classes (Internet Explorer,
    Mozilla, Webkit, and Opera) as well as
    version information.

    Available flags are:

    webkit (as of jQuery 1.4) safari
    (deprecated) opera msie mozilla This
    property is available immediately. It
    is therefore safe to use it to
    determine whether or not to call
    $(document).ready(). The $.browser
    property is deprecated in jQuery 1.3,
    and its functionality may be moved to
    a team-supported plugin in a future
    release of jQuery.

    Because $.browser uses
    navigator.userAgent to determine the
    platform, it is vulnerable to spoofing
    by the user or misrepresentation by
    the browser itself. It is always best
    to avoid browser-specific code
    entirely where possible. The $.support
    property is available for detection of
    support for particular features rather
    than relying on $.browser.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this is a stupid question, but I've looked for 45 mins now
I know that design patterns is generally something that's connected to OO programming, but
I know regex and substrings is a common question on here but i can
I know of cufon and one other similar. But what is the best way
I know this is a very simple question for you experts,but please forgive me.Im
I KNOW I did this in WP7 (not WP7.1) and I can't figure out
I know this is an oft asked question, but I've tried some of the
Know of a way to mock %[]? I'm writing tests for code that makes
I know how to hide CSS from all browsers except the iPhone: see How
I know that this may be common knowledge, but is there a way to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.