468,272 Members | 2,025 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,272 developers. It's quick & easy.

checking out if their U-A/browser settings support JavaScript, java, ...

..
Does anyone know of a smart way to do it?
..
There are plenty of users that don't support java, javascript and/or
AJAX's XMLHTTPRequest (people with handhelds, PDAs and ...) my app
would serve them basically the same page, but without the same
functionality
..
I am looking for ideas from people who have dealt with these issues.
..
Anyone?
..
Thanks
onetitfemme

Apr 4 '06 #1
5 1667
onetitfemme said the following on 4/4/2006 11:14 AM:
..
Does anyone know of a smart way to do it?
To do what?
..
There are plenty of users that don't support java, javascript and/or
AJAX's XMLHTTPRequest (people with handhelds, PDAs and ...) my app
would serve them basically the same page, but without the same
functionality


Have your non-JS version the page people visit first. Then, use
Javascript to redirect them to the JS version. If JS is not present,
then they get the non-JS version. Or, you simply take the non-JS version
and enhance it using JS so that it doesn't matter - 1 page. It is what
is referred to as "degrading gracefully".

As for Java, that is a different question all together and you will
probably get better advice on Java questions in comp.lang.java and it's
heirarchy.


--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 4 '06 #2
JRS: In article <Rr******************************@comcast.com>, dated
Tue, 4 Apr 2006 15:31:54 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :

Have your non-JS version the page people visit first. Then, use
Javascript to redirect them to the JS version. If JS is not present,
then they get the non-JS version. Or, you simply take the non-JS version
and enhance it using JS so that it doesn't matter - 1 page. It is what
is referred to as "degrading gracefully".


UNTESTED :

ISTM that one can write a small page that expects to be called as
thispage.htm?thatpage.htm .

Page index.html uses javascript to call thatpage.htm immediately, and if
thatpage.htm is not supplied it likewise calls index.htm, perhaps after
a second's delay.

It also contains HTML text saying :-

"Some of my pages need javascript, which you do not have enabled. For
the index page, <a href="index.htm">select</a>.

It could also contain a META redirecting to index.htm after one or more
seconds.

The above is related to my "Frame This" code (frames-4.htm).

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Apr 5 '06 #3
Dr John Stockton said the following on 4/5/2006 11:14 AM:
JRS: In article <Rr******************************@comcast.com>, dated
Tue, 4 Apr 2006 15:31:54 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :
Have your non-JS version the page people visit first. Then, use
Javascript to redirect them to the JS version. If JS is not present,
then they get the non-JS version. Or, you simply take the non-JS version
and enhance it using JS so that it doesn't matter - 1 page. It is what
is referred to as "degrading gracefully".
UNTESTED :

ISTM that one can write a small page that expects to be called as
thispage.htm?thatpage.htm .

Page index.html uses javascript to call thatpage.htm immediately, and if
thatpage.htm is not supplied it likewise calls index.htm, perhaps after
a second's delay.


That is very possible and not that difficult to implement. But unless
thatpage.htm is used as a parameter to the page, whats the point if you
are going to redirect to another page without it. Two different pages
based on a parameter implies the parameter means something?
It also contains HTML text saying :-

"Some of my pages need javascript, which you do not have enabled. For
the index page, <a href="index.htm">select</a>.

It could also contain a META redirecting to index.htm after one or more
seconds.
META redirects can be explicitly disabled in IE6.
The above is related to my "Frame This" code (frames-4.htm).


There is no need to make it so complicated though as it is simple.
Make the index.html page the non-JS version and in that page have a
simple script snippet:

<script type="text/javascript">
top.window.location='pageWithJSRequired.html';
</script>

Then, the non-JS gets the non-JS version and the JS people get the JS
version.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 6 '06 #4
JRS: In article <K7******************************@comcast.com>, dated
Wed, 5 Apr 2006 20:26:04 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :

It could also contain a META redirecting to index.htm after one or more
seconds.


META redirects can be explicitly disabled in IE6.


So those who choose to use IE6 and choose to disable META will need to
select the link provided. That's no reason to make everybody else do
it.
The above is related to my "Frame This" code (frames-4.htm).


There is no need to make it so complicated though as it is simple.
Make the index.html page the non-JS version and in that page have a
simple script snippet:

<script type="text/javascript">
top.window.location='pageWithJSRequired.html';
</script>

Then, the non-JS gets the non-JS version and the JS people get the JS
version.


No; both get the non-JS version and those using script also get the
script version. My aim was to minimise the amount of download that the
end users did not end up reading.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Apr 6 '06 #5
Dr John Stockton said the following on 4/6/2006 3:28 PM:
JRS: In article <K7******************************@comcast.com>, dated
Wed, 5 Apr 2006 20:26:04 remote, seen in news:comp.lang.javascript,
Randy Webb <Hi************@aol.com> posted :
It could also contain a META redirecting to index.htm after one or more
seconds.

META redirects can be explicitly disabled in IE6.


So those who choose to use IE6 and choose to disable META will need to
select the link provided. That's no reason to make everybody else do
it.


You are correct but I still don't see a need/use for a META redirect.
The above is related to my "Frame This" code (frames-4.htm).

There is no need to make it so complicated though as it is simple.
Make the index.html page the non-JS version and in that page have a
simple script snippet:

<script type="text/javascript">
top.window.location='pageWithJSRequired.html';
</script>

Then, the non-JS gets the non-JS version and the JS people get the JS
version.


No; both get the non-JS version and those using script also get the
script version. My aim was to minimise the amount of download that the
end users did not end up reading.


You create the non-JS version. Make it work properly. Then, you enhance
it with scripting and include all your scripting in external files.

The non-JS get a working page.
The JS get a working page.
Nobody downloads more than they need to.

Why mess with a META redirect?
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 7 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by cruiserweight | last post: by
17 posts views Thread by Christopher Benson-Manica | last post: by
5 posts views Thread by David Baker | last post: by
1 post views Thread by Lance | last post: by
4 posts views Thread by trpost | last post: by
16 posts views Thread by Eric | last post: by
2 posts views Thread by Richard Maher | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.