/    Sign up×
Community /Pin to ProfileBookmark

Different browser support

What code do I need to test for what browser a user has as IM trying to avoid using scripting that will cause issues in other browsers, I currently test my pages in IE and thats all I need them to do at the moment.

When I publish them, I will need to be able to deal with alternate browsers and dont know how to deal with them, any ideas?

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@felgallSep 27.2005 — 
  • 1. Use feature sensing not browser sensing. If you want to use a particular feature in you code then test if the browser supports the feature don't test if it is XYZ browser because ABC browser may also support the feature and you don't want a list of hundreds of different browsers that you need to update each time a new browser that supports different features comes out.


  • 2. IE is the least compliant browser. Test on any browser other than IE first and then patch your script to work on IE. This will result in much smaller and cleaner code than you could possibly get working the other way around.
  • Copy linkTweet thisAlerts:
    @webstuffauthorSep 29.2005 — All I need to do is have parts of the script code that will enable firefox as well as other browsers run my scripts properly.

    IM not too bothered if the other browsers wont display the images and other objects correctly as my target is MSIE and if FF or Opera cant hack my scripts then tough.

    However, it would be nice to know what the differences are in the code.
    Copy linkTweet thisAlerts:
    @KravvitzSep 29.2005 — Why don't you care about non-IE browsers?
    Copy linkTweet thisAlerts:
    @felgallSep 29.2005 — My site stats are showing IE users as just under 80% and falling fast. Unless the new IE7 is a lot more compatible with the standards then I would expect this fall to continue. All of the more knowledgable computer users have made the switch to modern web browsers so I guess if you don't care if your site works in modern browsers and don't care that your pages don't follow the standards then your target audience must not include people who understand computers.

    Also if you write Javascript properly it will run in all browsers. IE has a habit of automatically mapping one field onto another completely different field which it shouldn't be doing if it were following the standards. Try learning how to write proper Javascript and test it first in a decent web browser. The changes to get it to work on IE as well are then minimal.
    Copy linkTweet thisAlerts:
    @webstuffauthorSep 30.2005 — Why don't you care about non-IE browsers?[/QUOTE]

    Because 99.9% of windows networks will use an IE only browser, that is the case with most corporations and offices I have been fortunate enough to work or visit or refit with equiptment.

    Alternate browser ARE A PERSONAL CHOICE and I for one dont have any issues with using IE, I have used FF and find it more of an anoyance with its paranoid script pop up alert telling me constantly that scripts were stopped from running that potentially, yeah yeah yeah and considering I wrote them, I want them to run...

    Give you a bigger picture?
    Copy linkTweet thisAlerts:
    @felgallSep 30.2005 — Turn on proper security in IE to plug a few of the hundreds of outstanding security holes and most Javascript wont run then at all on IE and most of what wil run will pop up as many or more security alerts as on other browsers.

    The number of IE users is falling as more people realize all of the problems with this antiquated non-standard browser. As Firefox and Opera both provide smaller standards compliant browsers that are free more and more security staff are looking at installing one of those browsers to resolve security issues on their system.

    Which browser to use is the PERSONAL CHOICE of your visitor and you have no right to attempt to dictate that choice to them by building a site that only works on one browser.
    Copy linkTweet thisAlerts:
    @webstuffauthorOct 02.2005 — Not out of the box it wont, FF is a right pain.

    With any browser you can apply settings and other security features.

    I suppose next thing you'll be pointing out is that Linux is far superior than windows...

    As for the whole thing, given the target, it is very unlikely that any of them would be using another browser, so your argument really is falling on deaf ears pal. Blowing ones own trumpet on how much you know about browsers does not make you a consultant, if you are one as you state, you would also realise that the end user dictates what platform that the device or system is to use and very often what coding environments are to be used, etc...

    I thought it would be nice for the very few in minority in the catchment IM aiming at, if they happen to, be able to use a browser of choice but your making such a big issue over it, it seems pointless to explain it as its basically doing a 747 on you.

    Sorry to say your not helping but clouding the issue and in most forum circles, what your doing is considered hijacking, turing a thread question into another subject.
    ×

    Success!

    Help @webstuff spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.17,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...