Greetings,
This isn't a very creative solution, but it works. (Sort of.) On the "enterance page" to your site, or where ever you want to test for JavaScript, give the user an auto-jump page just prior to their actual CGI destination.
<HTML><HEAD><TITLE>Something Interesting</TITLE>
<SCRIPT language="JavaScript"><!--
document.location.href="/cgi-bin/destination.cgi?hasjs=1";
// --></SCRIPT>
</HEAD>
<NOSCRIPT>
<Meta HTTP-EQUIV="Refresh" CONTENT="0;URL=/cgi-bin/destination.cgi?has
+js=0">
</NOSCRIPT>
</HTML>
Couple things bad about this. First of all, it forces the user to make an additional HTTP hop before getting to destination.cgi or where ever. The other bad thing is that the "?hasjs=" thing shows up in the URL. That annoys me.
Another idea might be to attempt to write a cookie with JavaScript when the user first gets to your site, then read that cookie with each Perl CGI. If Perl can read the cookie, then you know JavaScript was at least enabled back when you set the cookie (few seconds, couple minutes). Unfortunately, this solution relies on the user allowing the cookie, which some users still have problems with.
-Gryphon.
|