473,585 Members | 2,556 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Detecting JS enabled/capable browser

I'm working on a project to collect web application usage statistics. What
are the recommended ways of detecting whether a browser is JavaScript
enabled and/or capable? Obviously I can write a script to invoke something
on the server, and if it works, then it works. Is there a better way? I'm
looking for the least intrusive way of doing it, from a web application
point of view. i.e. I'd like to be able to drop this into an existing
application without altering anything already there. It would be nice if
there were just a "JavaScript-Enabled" HTTP header.
Jul 23 '05 #1
25 2884
On Fri, 24 Dec 2004 14:04:23 -0600, "Ryan Stewart"
<zz********@gSP AMo.com> wrote:
I'm working on a project to collect web application usage statistics. What
are the recommended ways of detecting whether a browser is JavaScript
enabled and/or capable? Obviously I can write a script to invoke something
on the server, and if it works, then it works. Is there a better way? I'm
looking for the least intrusive way of doing it, from a web application
point of view. i.e. I'd like to be able to drop this into an existing
application without altering anything already there. It would be nice if
there were just a "JavaScript-Enabled" HTTP header.


The gross statistic javascript enabled is almost completely pointless
thing to collect, as it tells you nothing about how capable the script
engine is, NN2 had script support, do you really want to know if it's
script enabled? Does your application work with it?

Jim.
Jul 23 '05 #2
"Jim Ley" <ji*@jibbering. com> wrote in message
news:41******** ******@news.ind ividual.net...
On Fri, 24 Dec 2004 14:04:23 -0600, "Ryan Stewart"
<zz********@gSP AMo.com> wrote:
I'm working on a project to collect web application usage statistics. What
are the recommended ways of detecting whether a browser is JavaScript
enabled and/or capable? Obviously I can write a script to invoke something
on the server, and if it works, then it works. Is there a better way? I'm
looking for the least intrusive way of doing it, from a web application
point of view. i.e. I'd like to be able to drop this into an existing
application without altering anything already there. It would be nice if
there were just a "JavaScript-Enabled" HTTP header.


The gross statistic javascript enabled is almost completely pointless
thing to collect, as it tells you nothing about how capable the script
engine is, NN2 had script support, do you really want to know if it's
script enabled? Does your application work with it?

That's why I'm collecting browser statistics, too, in addition to many other
things. The JavaScript portion is the only part related to this newsgroup.
Do you know how to do it or not?
Jul 23 '05 #3
A small piece of js on the client to create an image and set its
source to a url of your choice? (Match up logged info with your other
browser stats)

If this is for an application involving login then alternatively you
could have some js on the login page populate a hidden form element
(and then hope the user doesn't enable/disable while using the
application.... )

Neither distinguish between js-incapable and js-disabled though....

Tim.
"Ryan Stewart" <zz********@gSP AMo.com> wrote in message
news:kf******** ************@te xas.net...
I'm working on a project to collect web application usage
statistics. What are the recommended ways of detecting whether a
browser is JavaScript enabled and/or capable? Obviously I can write
a script to invoke something on the server, and if it works, then it
works. Is there a better way? I'm looking for the least intrusive
way of doing it, from a web application point of view. i.e. I'd like
to be able to drop this into an existing application without
altering anything already there. It would be nice if there were just
a "JavaScript-Enabled" HTTP header.

Jul 23 '05 #4
Ryan Stewart wrote:
I'm working on a project to collect web application usage statistics. What
are the recommended ways of detecting whether a browser is JavaScript
enabled and/or capable? Obviously I can write a script to invoke something
on the server, and if it works, then it works. Is there a better way? I'm
looking for the least intrusive way of doing it, from a web application
point of view. i.e. I'd like to be able to drop this into an existing
application without altering anything already there. It would be nice if
there were just a "JavaScript-Enabled" HTTP header.

Wonder what that <noscript> tag is all about?

www.google.com has a few answers.
Jul 23 '05 #5
Richard wrote on 27 dec 2004 in comp.lang.javas cript:
Wonder what that <noscript> tag is all about?

www.google.com has a few answers.


<http://www.w3.org/TR/REC-html40/interact/scripts.html>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 23 '05 #6
Richard wrote:
Ryan Stewart wrote:
I'm working on a project to collect web application usage
statistics. What are the recommended ways of detecting
whether a browser is JavaScript enabled and/or capable? ...

The recommended approach is to arrange to not have to care. That avoids
the consequences of the aspects of HTTP that make any form of statistics
gathering flawed to the point of being useless, the impossibility of
implementing any mechanism for determining that client-side scripting is
available without an omniscient knowledge of all scriptable web
browsers, and the fact that such information is next to useless anyway.

<snip> Wonder what that <noscript> tag is all about?

www.google.com has a few answers.


The NOSCRIPT element was a nice idea that was rendered useless by
suffering short-sighted implementation and specification. They may have
had some value while there was just one scriptable client. They
certainly no longer have any value in Internet browser scripting because
they can do nothing towards covering the third inevitability of script
outcome. And once that third possibility has been covered by design the
NOSCRIPT tag has become superfluous as the consequences of a client's
inability to execute scripts has already been addressed.

Richard.
Jul 23 '05 #7
"Richard" <An*******@127. 001> wrote in message
news:cq******** @news3.newsguy. com...
Ryan Stewart wrote:
I'm working on a project to collect web application usage statistics.
What
are the recommended ways of detecting whether a browser is JavaScript
enabled and/or capable? Obviously I can write a script to invoke
something
on the server, and if it works, then it works. Is there a better way? I'm
looking for the least intrusive way of doing it, from a web application
point of view. i.e. I'd like to be able to drop this into an existing
application without altering anything already there. It would be nice if
there were just a "JavaScript-Enabled" HTTP header.


Wonder what that <noscript> tag is all about?

www.google.com has a few answers.

No, I know exactly what it's all about, and
http://www.w3.org/TR/html401/interac...#edef-NOSCRIPT is a much
more direct link. It is, however, totally irrelevant to my question. I don't
want to *do* something based on JS availability. I just want to *know* about
it so that I can track it.
Jul 23 '05 #8
"Evertjan." <ex************ **@interxnl.net > wrote in message
news:Xn******** ***********@194 .109.133.29...
Richard wrote on 27 dec 2004 in comp.lang.javas cript:
Wonder what that <noscript> tag is all about?

www.google.com has a few answers.


<http://www.w3.org/TR/REC-html40/interact/scripts.html>

Ah, yeah. That's what I said :)
Jul 23 '05 #9
"Richard Cornford" <Ri*****@litote s.demon.co.uk> wrote in message
news:cq******** ***********@new s.demon.co.uk.. .
Richard wrote:
Ryan Stewart wrote:
I'm working on a project to collect web application usage
statistics. What are the recommended ways of detecting
whether a browser is JavaScript enabled and/or capable? ...


The recommended approach is to arrange to not have to care. That avoids
the consequences of the aspects of HTTP that make any form of statistics
gathering flawed to the point of being useless, the impossibility of
implementing any mechanism for determining that client-side scripting is
available without an omniscient knowledge of all scriptable web
browsers, and the fact that such information is next to useless anyway.

I always arrange to not have to care. I'm simply curious and would like to
have some numbers to show. I would guess that about 95% of the users that I
code for are using IE 6. Of the rest, most probably use NN 7. That's
something I'm going to find out, and I'd also just like to know how many of
them have turned off JS. I'm guessing that percentage will be very low--in
the neighborhood of 2%. I am also curious as to what about HTTP makes you
think that statistics gathering is pointless.
Jul 23 '05 #10

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

Similar topics

10
4106
by: Frances Del Rio | last post by:
pls, why is this not working? <SCRIPT language=JavaScript type="text/javascript"> var br = '<SCRIPT language=Javascript' br += 'src="js_pop.js" type="text/javascript">' br += '</SCRIPT>' var op = '<SCRIPT language=Javascript' op += 'src="js_pop-op.js" type="text/javascript">' op += '</SCRIPT>' if (navigator.userAgent.indexOf('Opera') !=...
13
5842
by: dave yan | last post by:
hi, i have some forms which use javascript for data validation, e.g., checking to make sure all required fields are completed, checking that data falls within valid ranges for certain fields, etc. if an error occurs, i'm sending the user a message via the alert window. the form is then not submitted until the errors are corrected. ...
12
2572
by: confused | last post by:
After expressing my interest in expanding my new knowledge of HTML and CSS into the wild realm of JavaScript, I was advised that it is wiser to avoid it, since not all browsers are use it or are enabled to read it. After searching for other opinions on the web, I found that some estimate that the frequency of browsers that can read JS...
13
8456
by: Alex Molochnikov | last post by:
Is there any way to find out programmatically if Javascript is supported/enabled in a browser? By "programmatically" I mean on the Java servlet side. TIA Alex Molochnikov Gestalt Corporation
6
2989
by: Astra | last post by:
Hi All I want to print a message on the first page if a client's browser doesn't have JavaScript enabled. To do this I used the following code: <% ' create an instance of the Browser Capabilities component dim BrowserDetect Set BrowserDetect = Server.CreateObject("MSWC.BrowserType")
9
3053
by: SHarris | last post by:
Hello, In our new intranet ASP.NET project, two requirements are that the browser accept cookies AND JavaScript. We are requiring the use of Internet Explorer 6+. 1. Using C# in an ASP.NET application, how can we code the project to check to make sure the browser accepts cookies? 2. Where would we put this code? In Global.asax? 3. ...
2
1353
by: Barry | last post by:
Hi How do i detect if the browser has javascript enabled. Note: i am not refereing to Request.Browser.javascript Barry
2
1135
by: ron | last post by:
Hi, I working on a .net web project which need to check javascript disabled or enabled. I use the code below: If Request.Browser.JavaScript = True Then .... end if The problem is 'Request.Browser.JavaScript' always return 'true' . I don't
18
2455
by: damezumari | last post by:
I would like to know how many of the visitors to my site has js enabled and how many has it turned off. I haven't found a simple solution searching Google groups so I suggest the following using php and mysql: Create a table mc_jscount table in mysql with two fields nonjs (int) and js (int). Create one record with nonjs and js set to...
0
7908
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...
0
7836
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...
1
7950
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...
0
8212
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6606
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5389
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3835
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...
0
3863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2343
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

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.