Getting information about the browser with JavaScript

If you've been looking for a way to give cutting-edge content to visitors with the latest browsers, yet not leave users with older browsers out in the cold, detecting browser version, platform, and capabilities with JavaScript may be the answer.

Sponsored Links:

Related Topics

JavaScript RegExp Example: Regular Expression Tester
Feel free to test JavaScript's RegExp support right here in your browser. Obviously, JavaScript (or Microsoft's variant JScript) will need to be enabled in your browser for this to work. Since this tester is implemented in JavaScript, it will reflect the features and limitations of your web browser's JavaScript implementation.

Determining JavaScript cookie support in client's browser
If your script relies on JavaScript cookies to store and persist information, it's a good idea to always make sure the user's browser has cookies enabled first. This tutorial shows you how to perform this detection.

JavaScript Promises
JavaScript is single threaded, meaning that two bits of script cannot run at the same time, they have to run one after another. In browsers, JavaScript shares a thread with a load of other stuff. What that stuff is differs from browser to browser, but typically JavaScript is in the same queue as painting, updating styles, and handling user actions (such as highlighting text and interacting with form controls). Activity in one of these things delays the others.

Browser Detect Script
Our client side browser sniffer based on JavaScript, which includes links from our popular object and method detection tests to more detailed information on how they work.

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.

Resources for JavaScript and DOM Compatibility Tables
Although Can I Use is great for many cutting-edge features, there’s still a lot of JavaScript and DOM stuff that’s not included in there. So what other options are there for looking up browser support for many different JavaScript and DOM features? I’m always doing research on various front-end technologies, but the one thing I’ve yet to find is a really good one-stop resource that lists browser support for all aspects of JavaScript and the DOM, including the various HTML5 APIs.

Browser Version Control
There are different browsers and versions out there. Thus you, the programmer, do not know what JavaScript capabilities the user has. Insuring that the scripts you write run in most users browsers can be done in a few different ways.One way is to use JavaScript to check which browser they are using, and then program accordingly. This is the most common way to avoid any scripting error.

Browser environment
The browser provides us with a hierarchy of objects which we can use to control and access various information about time, screen, page, elements on a page etc. On the top is the window, also called global object. All other objects form 3 groups: Document Object Model, Browser Object Model, JavaScript Objects and Functions...

Say Hello to HTML5 Web Worker
Have you ever been to a website that didn't respond to your click and froze or crashed your browser? The cause most likely JavaScript, especially those site with JavaScript-heavy. In order to speed up your JavaScript processing time, there are several ways to optimize your JavaScript, such as with the help of Web Worker.

JavaScript ‘this’ in Different Contexts
JavaScript has a reserved keyword called this that references something different depending on where you are in a JavaScript program. In this post I’m going to summarize, by example, some different contexts and discuss what “this” would represent in each case. Note that all of these examples assume you’re developing client-side JavaScript in a browser.

Check if javascript enabled on visitor browser
This lesson will first teach you how to enable JavaScript in Internet Explorer, Firefox, and Opera, then show you how you can write a very simple script to separate website visitors who don't have JavaScript enabled from those who do.

AJAX Tutorial For Beginners
What is AJAX? AJAX stands for Asynchronous JavaScript and XML. AJAX uses a combination of Javascript and XML to allow web pages to be updated with new data from the server. It consists of HTML, JavaScript, DHTML, and DOM. The traditional way of processing data between client's browser and a server was to submit a HTML form and send data to the server, the server processed the data and sent a response back to the browser.

Placing JavaScript in your pages
You need to properly place a JavaScript in an HTML page to make sure the browser executes it. It isn't particularly difficult, but you do have to separate behavior (JavaScript) and structure (XHTML). Although there are two ways of doing this, using JavaScript includes is the best way because that makes sure your JavaScript code will reside outside your HTML file. This makes your pages easier to maintain, since they contain only XHTML. It also allows you to modify the behaviour of your entire site by editing one single file.

Sometimes instead of just adding your javascript to the page and having the browser perform the tasks as soon as the script is read, you might want your javascript to be performed only upon the detection of a certain event. A function is a block of code which can be called from any point in a script after it has been declared. It is basically a compartmentalized JavaScript designed to accomplish a single task.

Starting a JavaScript
How do you tell the browser that a script is starting? Moreover, how does he know what kind of script is starting? What if the browser doesn't support JavaScript?.

What is JavaScript ?
A JavaScript consists of JavaScript statements that are placed within the ... HTML tags in a web page. You can place the tag containing your JavaScript anywhere within you web page but it is preferred way to keep it within the tags. The tag alert the browser program to begin interpreting all the text between these tags as a script.

Detected Internet Browser
A useful but often overrated JavaScript function is the browser detect. Sometimes you want to give specific instructions or load a new page in case the viewer uses, for instance, Safari.

Browser window properties and methods
The dualistic window object provides global JavaScript object and browser window interface. In this section we concentrate on the browser part. Window has a lot in common with DOM elements. Many events ultimately bubble to window and can be caught by its handlers.

Tutorial: Introduction to JavaScript
JavaScript is an easy-to-learn programming language which can be built into Web pages, so that it executes from within the browser rather than on the web server. Intranets especially can leverage the power of JavaScript to create "smart" Web pages which can process data and interact with the user. In this introduction we concisely look at the main programming points of the JavaScript language.

Learning Intermediate JavaScript Faster Than Ever!
Today we are going to take a step further down the path of JavaScript greatness. Last time we learned a whole bunch about the basics of JavaScript. We learned what a variable is, how we can store information into them and how we can use that information. We also learned how to make a function and pass variables to a function in two different ways. We even learned about if else conditions.