W
What-a-Tool
I'm playing around in my personal site trying to figure out a way to detect
if JavaScript is enabled client side, and get that info back to the server
without any manual intervention, or visibility on the clients end.
What I am doing now is:
Set a variable for - Scripting = "Unverified"
Send a blank page to the client with a hidden form field, and some
JavaScript which sets the hidden field to "Verified" and automatically
submits the form.
As soon as the form page is sent, I have other code which runs a timer loop
on the server for 3 seconds, then sends a page to the clients computer -
which page depends on whether or not variable Scripting now equals
"Unverified" or "Verified".(Haven't played around with this time much, to
see just how much I actually need)
This, of course, would only have to be done the very first time the client
goes to my site, but still, I hate the thought of purposely putting a delay
on the loading of my page, and don't care for the idea of running a timer
loop on the server everytime someone accesses the page.
Granted - for my personal site, this is a very minor problem, as the number
of visitors is going to be pretty small - but still, there has got to be a
better way!
Anyone have any suggestions or opinions? (I am still a beginner at web
programming, and every thing I do is still a learning experience
Thanks
--
/ Sean the Mc /
"Opinions are like flatulence - everyone loves the sound of their own, but
anyone else's usually just stinks !"
-anonymous
if JavaScript is enabled client side, and get that info back to the server
without any manual intervention, or visibility on the clients end.
What I am doing now is:
Set a variable for - Scripting = "Unverified"
Send a blank page to the client with a hidden form field, and some
JavaScript which sets the hidden field to "Verified" and automatically
submits the form.
As soon as the form page is sent, I have other code which runs a timer loop
on the server for 3 seconds, then sends a page to the clients computer -
which page depends on whether or not variable Scripting now equals
"Unverified" or "Verified".(Haven't played around with this time much, to
see just how much I actually need)
This, of course, would only have to be done the very first time the client
goes to my site, but still, I hate the thought of purposely putting a delay
on the loading of my page, and don't care for the idea of running a timer
loop on the server everytime someone accesses the page.
Granted - for my personal site, this is a very minor problem, as the number
of visitors is going to be pretty small - but still, there has got to be a
better way!
Anyone have any suggestions or opinions? (I am still a beginner at web
programming, and every thing I do is still a learning experience
Thanks
--
/ Sean the Mc /
"Opinions are like flatulence - everyone loves the sound of their own, but
anyone else's usually just stinks !"
-anonymous