You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by ht...@karsites.net on 2005/12/28 00:49:25 UTC

[users@httpd] Detecting Javascript via Apache 2

Hi all.

Is it possible for apache 2.0 to detect if a browser has 
javascript enabled when a page is requested, and then 
passing this value to PHP?

This would allow me to serve different page content, 
depending on whether the user's browser has javascript 
enabled or not.

Regard

Keith Roberts




 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Detecting Javascript via Apache 2

Posted by Boysenberry Payne <bo...@humaniteque.com>.
You probably want to assume it doesn't then if it does set a cookie or 
establish it via link
or by using javascript to tell php it does and save it in the session.

Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Dec 27, 2005, at 5:49 PM, httpd2@karsites.net wrote:

>
> Hi all.
>
> Is it possible for apache 2.0 to detect if a browser has
> javascript enabled when a page is requested, and then
> passing this value to PHP?
>
> This would allow me to serve different page content,
> depending on whether the user's browser has javascript
> enabled or not.
>
> Regard
>
> Keith Roberts
>
>
>
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Detecting Javascript via Apache 2

Posted by Octavian Rasnita <or...@fcc.ro>.
From: <ht...@karsites.net>

>
> Hi all.
>
> Is it possible for apache 2.0 to detect if a browser has
> javascript enabled when a page is requested, and then
> passing this value to PHP?
>
> This would allow me to serve different page content,
> depending on whether the user's browser has javascript
> enabled or not.
>
> Regard

It is not relevant if a page has or not Javascript enabled.
If you want to create pages that work in every browser, read and follow
World Wide Web's recommendations at www.w3c.org.

What does it mean if Javascript is enabled? It means that the browser has it
enabled, but you won't know if the user is able to use it.
Maybe the computer she uses doesn't have a mouse or the user is blind and
should use only the keyboard, so the first important thing is to create the
page that follow W3C's rules.

If you want to see if the browser has Javascript enabled, you can create a
Javascript code that GET's a page from the web server. If the page is
gotten, then the browser supports Javascript and if it is not, it means that
the code was not working so it might be disabled.

Teddy


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Detecting Javascript via Apache 2

Posted by Sean Davis <sd...@mail.nih.gov>.


On 12/27/05 6:49 PM, "httpd2@karsites.net" <ht...@karsites.net> wrote:

> 
> Hi all.
> 
> Is it possible for apache 2.0 to detect if a browser has
> javascript enabled when a page is requested, and then
> passing this value to PHP?
> 
> This would allow me to serve different page content,
> depending on whether the user's browser has javascript
> enabled or not.

Nope.  There are many pages on how to deal with the issue using javascript.
I suggest looking here:

http://www.w3schools.com/js/default.asp

And more specifically here:

http://www.w3schools.com/js/js_howto.asp
http://www.w3schools.com/js/js_browser.asp

Hope that helps a bit.

Sean



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org