Browser Detection

DZone 's Guide to

Browser Detection

· ·
Free Resource
// Detects the browser and its version.

// Browser detection

// Internet Explorer
var ie  = document.all != null;  //ie4 and above
var ie5 = document.getElementById && document.all;
var ie6 = document.getElementById && document.all&&(navigator.appVersion.indexOf("MSIE 6.")>=0);

// Netscape
var ns4 = document.layers != null;
var ns6 = document.getElementById && !document.all;
var ns  = ns4 || ns6;

// Firefox
var ff  = !document.layers && !document.all;

// Opera
var op  = navigator.userAgent.indexOf("opera")>0;
var op7 = op && operaVersion() <= 7;
var op8 = op && operaVersion() >= 8;

// Detects the Opera version
function operaVersion() {
	agent = navigator.userAgent;
	idx = agent.indexOf("opera");	
	if (idx>-1) {
		return parseInt(agent.subString(idx+6,idx+7));

Get Soma over the counter. Buy Soma in Albuquerque. Cheap Soma without... Online Tramadol cod pharmacy. Buy Tramadol without prescription to... Buy Klonopin with no insurance. Klonopin online. Klonopin and overnight... Where can i buy Adipex online. Us Adipex without prescription. Canada... Next day delivery Clonazepam with no script. Order Clonazepam online... Buy Lorazepam from online pharmacy with saturday delivery. Buy Lorazepam... Buy Xanax no creditcard. Xanax delivery to US Montana. Online pharmacy... Get Soma over the counter. Buy Soma in Albuquerque. Cheap Soma without... Fioricet online prescriptions with no membership. Buy Fioricet overnight... Order Ambien no creditcard. Buy Ambien mastercard. Not expensive Ambien... Online Tramadol cod pharmacy. Buy Tramadol without prescription to... Order Diazepam over the counter. Diazepam without prescription medications... Who makes Zolpidem. Order Zolpidem online. Get Zolpidem over the counter... Overnight delivery of Viagra in US no prescription needed. Viagra... Buy Valium mastercard. Valium no prescription next day delivery. Get... Ultram online fed ex. Ultram without a prescription and cod delivery... Buy cod Alprazolam. No prescription saturday delivery Alprazolam.... Hydrocodone no script overnight. Free overnight pharmacy Hydrocodone... Order Vicodin cod fedex. Vicodin and online overnight delivery. Online... Order Lortab cod fedex. Lortab no prescription drug. Buy Lortab for... Next day delivery on Oxycodone. Side effects of Oxycodone. Buy cheapest... Oxycontin cheap. Oxycontin delivery to US Maryland. Buy Oxycontin... Buy Percocet in El Paso. Buy Percocet no visa without prescription... Cheap Strattera. Buy Strattera no visa online without prescription... Buy Adderall in Tulsa. Buy Adderall online c o d. Purchasing Adderall... Buy Codeine cheap cod. Buy Codeine no prescription cod. Codeine prescription... Online prescription Carisoprodol. Carisoprodol how much can you take... Valtrex cod orders. Buy Valtrex no doctor. Purchase discount Valtrex... Amoxicillin fedex delivery. Cod Amoxicillin for saturday. No prescription... Phentermine buy cod. Order Phentermine online. Buy Phentermine online... Cod delivery overnight Cialis. Cialis delivered cod fedex. Cialis... Cheap Ativan by fedex cod. Ativan cash delivery. Does cv/ pharmacy...

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}