473,791 Members | 3,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

extracting browser information

Rex
I want to find out as much as I can using JavaScript
about the user's browser and possible about the user himself or
herself.
is there a good guide anywhere on the Internet that explains what
information can be extracted using JavaScript? on various web pages I
see short mentions of variables such as document.referr er and
browser.name as I have yet to find a comprehensive listing of these
variables.

Can someone please point me to a listing of all such variables?

Thanks.

Jul 13 '06 #1
4 1846
Rex said the following on 7/13/2006 11:45 AM:
I want to find out as much as I can using JavaScript
about the user's browser and possible about the user himself or
herself.
Interesting.

navigator.sex --gives the sex of the user.
navigator.lastS ex --gives the date they last had sex.
navigator.favor iteDrink --gives the users favorite drink.
navigator.stupi d --gives the feasibility of this exercise.
is there a good guide anywhere on the Internet that explains what
information can be extracted using JavaScript?
A better question would be "What do you want to know?"
on various web pages I see short mentions of variables such as
document.referr er
document.referr er gives you the address - in limited circumstances - of
the page that opened the current page.
and browser.name as I have yet to find a comprehensive listing of these variables.
Never seen "browser.na me"
Can someone please point me to a listing of all such variables?
<URL: http://groups.google.c om/group/comp.lang.javas cript>

Happy hunting.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 13 '06 #2
Unlike the last poster, I'll try to give you some info. Please check
out these references and look at the objects and their properties

http://msdn.microsoft.com/library/de...ce/objects.asp
http://developer.mozilla.org/en/docs..._DOM_Reference

In particular would be the properties of window.navigato r (also called
window.clientIn formation in IE). Just be sure not to try to access
non-properties of objects. For example, mozilla browsers don't have the
window.clientIn formation so use something like the following.
var clientInformati on = {};
if( window.clientIn formation )
{
if( window.clientIn formation.cpuCl ass )
clientInformati on[ 'cpuClass' ] =
window.clientIn formation.cpuCl ass;
}
This will avoid exceptions when trying to query the properties

Rex wrote:
I want to find out as much as I can using JavaScript
about the user's browser and possible about the user himself or
herself.
is there a good guide anywhere on the Internet that explains what
information can be extracted using JavaScript? on various web pages I
see short mentions of variables such as document.referr er and
browser.name as I have yet to find a comprehensive listing of these
variables.

Can someone please point me to a listing of all such variables?

Thanks.
Jul 13 '06 #3
Rex

bobzimuta wrote:
Unlike the last poster, I'll try to give you some info. Please check
out these references and look at the objects and their properties
Thank you kindly.

Jul 13 '06 #4
bobzimuta said the following on 7/13/2006 12:04 PM:
Unlike the last poster,
What "last poster"? You mean the one who quoted properly and didn't turn
the post upside down?
I'll try to give you some info.
And the "last poster" didn't? I did, it just wasn't what you thought you
would see is all.
Please check out these references and look at the objects and their properties

http://msdn.microsoft.com/library/de...ce/objects.asp
http://developer.mozilla.org/en/docs..._DOM_Reference

In particular would be the properties of window.navigato r (also called
window.clientIn formation in IE).
All of which is unreliable and easily spoofed which makes it useless to
anybody that knows anything about them.
Just be sure not to try to access non-properties of objects.
Feature detection and then you don't *care* what browser it is.
For example, mozilla browsers don't have the
window.clientIn formation so use something like the following.
var clientInformati on = {};
if( window.clientIn formation )
That test, with the code, doesn't do what you think it does.

alert(window.cl ientInformation ) //---[object Object]

Without the var clientInformati on, it alerts [object Navigator]

If you want the navigator object, just refer to it directly:

window.navigato r
{
if( window.clientIn formation.cpuCl ass )
clientInformati on[ 'cpuClass' ] =
window.clientIn formation.cpuCl ass;
}
This will avoid exceptions when trying to query the properties
It is called "feature detection" and when you properly feature detect,
the browser becomes irrelevant. Even when the UA is not a browser at all.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 13 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
1995
by: Hayden Kirk | last post by:
Does anyone know where I should start with this. Im trying to extract the information in: $_SERVER['HTTP_USER_AGENT' But I dont know how to get the information out? What functions should I be looking at. I want to get the OS, Browser, IP etc.. Thanks Hayden Kirk
0
2947
by: Gnaneshwar Babu | last post by:
Hi I am facing a problem with extracting event logs of win32 to a file. Am using the following code to extract eventlogs to file use Win32::EventLog; $handle=Win32::EventLog->new("System", $ENV{ComputerName}) or die "Can't open Application EventLog\n"; $handle->GetNumber($recs) or die "Can't get number of EventLog records\n";
5
2184
by: Astra | last post by:
Hi All Is there an ASP way of extracting the height and width of a swf file so that I can specify these dims when adding the whole OBJECT code to the web page? Thanks Robbie
1
17193
by: v0lcan0 | last post by:
Any help on extracting the time part from the datetime field in SQL database. even though i had entered only the time part in the database when i extract the field it gives me only the date part. i’m using Vb.net datagrid as a front end. any assistance appreciated!! :?: --
2
2638
by: Chris Belcher | last post by:
First some background... The database tracks Action Items assigned to a group of 20 or so managers. Once the assignment is created it is then emailed to each of the managers that are included in the scope of the assignment. Among the functions that it provides is the ability to embed the source documents in the database using OLE. The user has requested the ability to forward the source document with the email. The embedded documents...
1
2045
by: detho | last post by:
Hi everyone... I am currently developing a streaming movie front-end for my companies' intranet. The script is done with PHP on the back-end and HTML and CSS for the front-end. Basically, the script displays the available videos in a list of links and when the user clicks on the video, the script grabs the query string information and concatinates the appropriate filename into a variable which is used to start Windows Media Player.
4
1694
by: Damo | last post by:
I have a program, That retrieves a webpage , such as a search engine results page from the web, Then I need to go through the document and retrieve just the search results. The problem is I want to omit the sponsored results. So is there a way I can start analysing the document at a specific point (ie after the sponsored results) Thanks
1
1216
by: TWX | last post by:
Hi there. I need to create a PHP programme that will return a person's birthday when his class and index number is keyed. I have the neccesary information but I only know how to create the frame of the programme, stuck at the part of extracting the birthday with the collected information that the user has chosen from the options. Can someone please give me a clue on how to do this, that is, to extract the wanted person's birthday (when his class...
0
902
by: koneo | last post by:
I had previously created an app that used an IE browser control to load our company "case managment" web app. The application would pull information from the loaded case and would use this information to create an email to the customer. Our company has since changed case managment solutions, and the new one will not allow itself to be loaded in the IE control. Is there a way to grab the html of a loaded page in an external browser window...
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10155
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5431
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.