Print Design Templates Take a look at these creative Graphic Design templates for brochures, flyers, newsletters, stationery, postcards, ads, menus and posters for a variety of businesses.
Invoicing 4 Freelancers A complete, secure, online billing application that maintains hourly service billing, flat fee billing and recurring charges. Integration with Authorize.Net and other leading payment gateways provides hands-free recurring billing with a sophisticated CRM system.
Free Design Magazines Browse through our extensive list of free Graphic Design, Web Design, Business, Computer, and Computer Graphics magazines, white papers, downloads and podcasts to find the titles that best match your skills and interests; topics include management, marketing, operations, sales, and technology. Simply complete the application form and submit it. All are absolutely free to freelance professionals who qualify.
Suggested Links Photoshop Tutorials
Logo Designer's Logos
Web Design Tools List
Layouts & Templates Directory
Web Design & Graphic Design Blog
Photoshop, Flash, 3D Studio Max Tutorials
Web Designers & Developers
Crafts for Kids
Photoshop Tutorial Man
Tutorial Guide -- Free Webmaster Tutorials
Design Contests
How to Draw
Work From Home Job Search
OTHER SITES WE OWN
AllFreelance
Graphic Design Resources Directory
Graphics Tutorials Directory
Social Networking Articles
Design Sites Up
All Freelance Work & Portfolios
Graphic Design Community
Education & Learning Directory
![]() |
home > Web Design Tutorials > Programming Tutorials > Javascripting Articles > Javascript Browser Detection Coding Tutorials
JavaScript's Browser-Based Objects
JavaScript has several browser-based objects. These allow us to interact with the browser and Web page itself. All of the browser-based objects are placed in a hierarchy, beginning with the window object.
JavaScript Browser Detection
The JavaScript Navigator object contains information about the visitor's browser.
Detect the visitor's browser and browser version
Example of Detect the visitor's browser and browser version.
More details about the visitor's browser
Example of More details about the visitor's browser.
All details about the visitor's browser
Example of All details about the visitor's browser.
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
||
Alert user, depending on browser
Example of Alert user, depending on browser.
Redirecting Based on Browser Type
Redirecting based on browser type can be done using a JavaScript function to check navigator.userAgent for the string "MSIE" which will tell you whether or not your visitors are using a version of Microsoft Internet Explorer. By modifying window.location,
Detect Web Browser Plug-ins
Using JavaScript you can detect what plug-ins exist within a Web Browser. However, this works only with Netscape Navigator. The following code shows how to detect for the audio/midi mime type…
JavaScript Redirection
Redirection is often used to take viewers to a page depending on their browser's name or version. To redirect a viewer instantly, you just need to add a short command in your head section…
JavaScript Browser Detection
Browser detection allows you to find out what browser your viewer is using, and then perform a script based on it-- or just to send a friendly message to those with your favorite browser.
Browser Entry Alert
This script shows an alert with the viewer's browser name and browser version when entering your page.
Browser Information Written on Page
This script writes the viewer's browser name and browser version onto your page.
Browser Redirect (Version 4 Browsers)
This script sends the viewer to the right page depending on the type of browser being used. If the browser is NS or IE, version 4 or better, the viewer is taken to a page for version 4 browsers. Otherwise, the viewer goes to a page for lower version brows
Browser Redirect (Netscape or Internet Explorer)
This script sends the viewer to the right page depending on the type of browser being used. If the browser is NS, it goes to an NS version of the page. If it is IE, it goes to an IE version of the page. Otherwise, the viewer goes to a page for other brows
Browser Reload/Refresh Button
This script allows the viewer to reload/refresh the current page by clicking a button.
Browser Detection
For various reasons, it may be useful to detect the visitor's browser type and version…
The Technique
Browser detection is based on the navigator object. This object holds name, version, etc. of the browser…
Browser Detection: Example
In this example we send Netscape visitors to Yahoo, while we send MSIE visitors to either Hotbot or MSN depending on the browser version.If it's none of the above the visitor is sent to Webcrawler.
Browser ReDirect
This tool will let you easily create a page that detects the visitor's browser and automatically loads a specific page depending on which browser is used.
Browser Information
If your visitors are not quite sure the details of the browser they are using, you can show them with this neat little script. The script will produce a table that shows the browser name, version, platform name, and whether Java is enabled.
Browser Information
This script does a great job of displaying information about your web browser including version, your computer's platform, if Java is enabled, how many pages you've visited, and screen resolution. Take a look, it's pretty cool.
Browser Name
I always like to show the visitor a little bit more about their computer than just the name. This script does that for me, or you…
Browser Properties
More information about the web browser than you knew existed! Find out the code name, color depth, platform, if java is enabled, resolution, ip address, hostname, and more! Simply incredible.
Browser-Specific Entry
If you maintain a different page for Microsoft Internet Explorer and another for Netscape browsers, you should use this script. Quite simply, it sends the right browser to the right browser-optimized page.
Browser Version
This script will also provide a little bit more information about the visitor's browser.
Browser Version
Unlike the previous browser information scripts, this one supports Netscape 6 and Opera browsers!
Browser & Version Redirect
If you maintain separate pages for Netscape and Internet Explorer browsers and want to additionally divide each browser's page into version pages, this script is for you.
History Length
It is surprising to know that a web page can actually know how many pages you have been to this browser session. That is exactly what this script does.
Info Table
JavaScript can write a neat little box to the screen telling the visitor's browser and operating system.
IP Address
This script displays the user's IP address in the title bar, status bar, and/or an alert box.
IP Address Filter
(Netscape 4.0+ with Java enabled only!) JavaScript can prevent visitors with certain IP addresses from visiting your site. Simply enter part of their IP address (the more you enter the greater the chance only the intended person will not be able to enter
IP Address Filter 2
Use this script to block IP addresses. Just add the address to the script and it will be blocked from entering your site.
Language
(Version 4.0+ browsers) Redirects a user to the page based on their language. For example, English language user browsers, which report the language as 'en' in most cases, can be redirected to an English page, while Spanish language user browser…
Resolution Page
When users visit your page, JavaScript will determine their screen's resolution and redirect them to the page of your site that you wrote for that screen size!
User Language and Country
Identify the language and country of the user's browser. Very comprehensive! IE only.
New Browsers Only
It's often necessary to make a script only accessible to the newer browsers (that can support the script without error) and keep older browsers from trying to work with it.
JavaScript's Browser-Based Objects
JavaScript has several browser-based objects. These allow us to interact with the browser and Web page itself. All of the browser-based objects are placed in a hierarchy, beginning with the window object.
Determine the width of the browser window
This javascript gives you the width of your browser window, useful if your design depends on the size of the screen. Note that Netscape & Internet Explorer both use different variable names.
Browser detection through JavaScript: Navigator Object
Getting client (browser) details is very easy through JavaScript. Client name, version, codename and the platform used are available through the navigator object and its properties.
RECENT ARTICLES from Graphic Design BloG
Business Cards: Ideas and Inspiration, Part II
Today we continue looking at business cards that stand out, and here’s hoping you get some inspiration and ideas! After all, you only get one first impression, so your business card should be something that showcases the best of your design abilities. On Wednesday we looked at the use of interesting shapes, 3D business cards, [...]
![]() |
![]() |
|
![]() |
![]() |
|
Making the Move from Freelance Work to Full-Time Employment
If you are like me, after graduating from a graphic design school, your goal was to make it as a freelance web designer. The lure of flexible hours, working from home and the freedom to manage your own time was too much to resist. At some point, I decided it may be ?easier? to work [...]
Tips for Asking for a Raise
At some point in our careers, there is a time when we open our paychecks and breathe a sigh of disappointment. After years of studying at a graphic design school and countless hours spent devoted to learning from colleagues and researching new design techniques, the numbers on our pay stub just don?t seem to measure [...]
Stock vs. Original Digital Photography
A picture is worth a thousand words. Graphic design schools teach us that photos on web sites have the potential to capture our attention, motivate us to read more or even propel us to navigate to another web site entirely. They inflict emotion and can establish a connection between site visitors and the goods or [...]
3 Tips to Manage Content Updates
While walking through the pharmacy I passed the aisle filled with red heart-shaped boxes filled with chocolates and remembered Valentine?s Day is quickly approaching. Even though I was surrounded by so many representations of love, it reminded me of one thing that I actually despise ? web content updates! Graphic design schools teach many, many [...]
Should You Drop the Drop-Down Menus?
I was recently on a home improvement web site searching for ideas for renovating my bathroom. After a few minutes on the site I realized that I was not going to find what I was looking for ? it certainly could have been there, but I just could not find it. Menu after menu had me [...]
Sharpen Your Skills and Gain an Edge at 2011 Web Design Conferences
Graphic design schools prepare us well for our immediate future, but it takes effort to stay on top of the ever-changing field of web design. Following are a few of the upcoming conferences and trade shows meant to help you stay a step ahead of the competition.
Interaction Eleven In its fourth year, Interaction Eleven is [...]
All Web Design Resources is a Directory & Blog Full of Tools for Web Site Designers
All Web Design Resources Portal is a Web Site Design education directory with resources & articles for Graphic Designers, Web Developers, & Web Designers including a Web Design forum, blog, graphics software tips, web development resources, web programming tools, web design jobs, advice for new web designers about web design schools and education as
well as tips for freelance web design business owners, and much more.