Is there any fallback mechanisms in Ruby on Rails 3.2 and 4.0 when someone has JavaScript disabled?
How would an application react, specifically when using ajax request. Would it fallback to normal requests?
I ask this because I need a website which also can handle requests from text browsers for disabled people.
What are some strategies if there is no default fallback.
See this post. Stop loading the page if Javascript is disabled
In general I can't really think about any fallback mechanism here - note that huge part of requests done by rails are in fact ajax requests, as it is impossible to send PUT or DELETE over (Instead of delete request, rails send ajax post request with data: {"_method"="delete"}
).
In short, for me disabling JS will break the page heavily, I'm gona test it today.
I'm not well experienced with RoR, but I suspect this is more a question of how you design your front-end architecture. My limited understanding is that RoR didn't provide any javascript "out of the box"; it's default state is to create views that produce flat HTML, which you can dress up how you like with JS and CSS.
Your HTML should be written such that the user should be able to get to all the content they are most interested in, without having to rely on JavaScript to do it. This means you should only use JS to augment the experience. In the language of common front-end practice, do progressive enhancement.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With