Re: Javascript detection , working version
| From: | Satyam | Date: | Tue, 02 Jan 2007 20:55:23 +0000 |
| Subject: | Re: Javascript detection , working version | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-246376@lists.php.net to get a copy of this message | ||
----- Original Message ----- From: "Robert Cummings" <robert@interjinn.com>
To: "Jürgen Wind" <jwind@gmx.de>
Cc: <php-general@lists.php.net>
Sent: Tuesday, January 02, 2007 8:57 PM
Subject: Re: [PHP] Javascript detection , working version
On Tue, 2007-01-02 at 11:32 -0800, Jürgen Wind wrote:What I usually do is to make the entry page the one that would be used without JavaScript and branch only if JavaScript is present. SatyamRobert Cummings wrote:Out of curiosity, can you guarantee the Javascript redirect will always occur before the meta redirect when Javascript is enabled? Otherwise you have a race condition. Cheers, Rob.i have no idea, it is just a quick&dirty hack, i'm no js expert ;) the js part is rather fast, maybe a little delay or window.write is neccessary after the redirect?No, you always want the javascript to run first. The question is whether a meta redirect could ever occur before the javascript redirect. If it can then occasionally you may get "javascript not detected" since the meta redirect would occur when in fact javascript is enabled. Cheers, Rob. --