Hey guys, I have a application written in rails that is used by various professors and assistants at different universities. I released the app yesterday to a pool of beta testers to get some feedback, and about 25% of them do not have the latest versions of firefox, safari, or IE. I''ve seen other sites use a redirect page, and I was wondering how to implement this in rails. I suspect it has something to do with grabbing the user agent data and checking it. Any help on this issue would be great. Thanks, Jin
The make-or-break component in ajax is XMLHttpRequest, so instead of checking user-agents, just check to see if xmlhttprequest is available. If you''re using prototype, you could do something like if(!Ajax.getTransport()) { window.location = ''errorpage''; } If your site relies on other functionality that older browsers don''t have, you could check for it too. The important thing is, don''t check user agent strings; check functionality. Tyler On 7/7/05, Jin Lee <jinslee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey guys, > > I have a application written in rails that is used by various > professors and assistants at different universities. I released the > app yesterday to a pool of beta testers to get some feedback, and > about 25% of them do not have the latest versions of firefox, safari, > or IE. > > I''ve seen other sites use a redirect page, and I was wondering how to > implement this in rails. I suspect it has something to do with > grabbing the user agent data and checking it. > > Any help on this issue would be great. > > Thanks, > Jin > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Dennis Sutch
2005-Jul-07 17:14 UTC
Re: Checking to make sure user has "ajax ready" browser
On 7/7/05, Tyler Kiley <tyler.kiley-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> The make-or-break component in ajax is XMLHttpRequest, so instead of > checking user-agents, just check to see if xmlhttprequest is > available. If you''re using prototype, you could do something like > > if(!Ajax.getTransport()) { > window.location = ''errorpage''; > } > > If your site relies on other functionality that older browsers don''t > have, you could check for it too. The important thing is, don''t check > user agent strings; check functionality.How about a method for displaying an error when JavaScript is turned off? -- Dennis Sutch dennis-+mObuC4wx48AvxtiuMwx3w@public.gmane.org
You mean like <noscript></noscript> ??? On 7/7/05, Dennis Sutch <dsutch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 7/7/05, Tyler Kiley <tyler.kiley-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > The make-or-break component in ajax is XMLHttpRequest, so instead of > > checking user-agents, just check to see if xmlhttprequest is > > available. If you''re using prototype, you could do something like > > > > if(!Ajax.getTransport()) { > > window.location = ''errorpage''; > > } > > > > If your site relies on other functionality that older browsers don''t > > have, you could check for it too. The important thing is, don''t check > > user agent strings; check functionality. > > How about a method for displaying an error when JavaScript is turned off? > > -- > Dennis Sutch > dennis-+mObuC4wx48AvxtiuMwx3w@public.gmane.org > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- "So long, and thanks for all the fish" Jeff Wood
Sean T Allen
2005-Jul-07 17:43 UTC
Re: Checking to make sure user has "ajax ready" browser
Jeff Wood wrote:>You mean like <noscript></noscript> ??? > >Or have a div that alerts to the need for js but have it hidden by an on_load so if they have javascript, they would never see it... _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails