473,708 Members | 2,344 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 2904
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
4117
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') != -1 ) {
13
5850
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. however, i've discovered that some users using the aol browser are
12
2576
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 currently is better than 90% -- that is certainly workable for me! Do you good people have any thoughts...
13
8477
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
2995
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
3058
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. Using C# in an ASP.NET application, how can we code the project to detect and make sure the browser...
2
1356
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
1137
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
2468
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 zero. Put this code at the top of your page:
0
8792
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
8699
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
9293
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9163
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...
0
7932
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5941
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4456
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...
2
2508
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2097
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.