Re: Javascript detection , working version
| From: | Jürgen Wind | Date: | Wed, 10 Jan 2007 12:54:21 +0000 |
| Subject: | Re: Javascript detection , working version | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-246838@lists.php.net to get a copy of this message | ||
Curt Zirzow-2 wrote:
>
> On 1/1/07, Jürgen Wind <jwind@gmx.de> wrote:
>>
>> well,
>> no cute css, but (hopefully) working - here is my quick & dirty version :
>>
>> http://149.222.235.16/public/
>
> I dont understand the point.
>
> Curt,
>
sorry, i should have posted the original code (it's merely js/html/browser
related, not php)
http://149.222.235.16/public/index.html
(20070102) :
----
<script>
<!--// index.html 20070102
D=new Date()
location.href='jstest.php?js=ok&t='+D.getTimezoneOffset()
//--></script>
<meta http-equiv='refresh' content='0;url=jstest.php?js=no'>
----
as i already said elsewhere in the thread: it was just a quick&dirty hack,
as tedds link didn't work.
But Roman made a good point:
>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.
so here is what's new in http://149.222.235.16/public/index.php (20070110)
:
----8<----
<noscript>
<meta http-equiv='refresh' content='0;url=jstest110.php?js=no'>
<?php /*** or put here your complete page for browsers with js disabled
***/ ?>
</noscript>
----
--
View this message in context: http://www.nabble.com/Javascript-detection-tf2905451.html#a8256985
Sent from the PHP - General mailing list archive at Nabble.com.