Is there a RoR best practice wrt determing in a visitor’s browser has JS
disabled? Is there even a way to find out? I’ve got a couple of pages
in my app that are not going to degrade gracefully at all. I really
need to point a visitor who has JS disabled down a seperate path. Any
ideas?
Is there a RoR best practice wrt determing in a visitor’s browser has JS
disabled? Is there even a way to find out? I’ve got a couple of pages in
my app that are not going to degrade gracefully at all. I really need to
point a visitor who has JS disabled down a seperate path. Any ideas?
This works with Firefox. No idea how IE handles it.
Put this somewhere inside your HEAD element. Change the URL to
something meaningful.
Is there a RoR best practice wrt determing in a visitor’s browser has JS
disabled? Is there even a way to find out? I’ve got a couple of pages in
my app that are not going to degrade gracefully at all. I really need to
point a visitor who has JS disabled down a seperate path. Any ideas?
It depends what you want to do.
You could have a split at the very beginning of your site. I haven’t
tested this
You could use this at any particular link within your site as well.
Maintaining two sets of views wouldn’t be DRY.
Or for just a few places that need special attention you can use the
tags. For a simple drop-down box form you can have a button
appear for people without Javascript.
Is there a RoR best practice wrt determing in a visitor’s browser has JS
disabled? Is there even a way to find out? I’ve got a couple of pages in
my app that are not going to degrade gracefully at all. I really need to
point a visitor who has JS disabled down a seperate path. Any ideas?
Hi Bill,
I just made a controller that degrades gracefully using respond_to
with html and rjs templates. I’m not sure who really has JavaScript
disabled in their browser but I was very pleased with how little extra
work it took to accommodate both. Maybe an extra 20 lines of code. For
something like a store front, where every sale is critical, this might
be a good approach.
Peter
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.