Hey there, Is there a Ruby script or library available to detect browser and operating system thru the user-agent header string? rgds Dema
I don''t know of any. It shouldn''t be tough to roll your own. Perhaps you can port another language''s sniffing method? On 5/12/05, Demetrius Nunes <demetrius-fDpYTK8McCzCdMRJFJuMdgh0onu2mTI+@public.gmane.org> wrote:> Hey there, > > Is there a Ruby script or library available to detect browser and > operating system thru the user-agent header string? > > rgds > Dema > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- rick http://techno-weenie.net
On 5/12/05, Demetrius Nunes <demetrius-fDpYTK8McCzCdMRJFJuMdgh0onu2mTI+@public.gmane.org> wrote:> Is there a Ruby script or library available to detect browser and > operating system thru the user-agent header string?Why do you want to do this? Please please please please please please don''t implement a site that locks out certain browsers, or serves different HTML/CSS to different types of browsers. -- Urban Artography http://artography.ath.cx
Rob Park wrote:> On 5/12/05, Demetrius Nunes <demetrius-fDpYTK8McCzCdMRJFJuMdgh0onu2mTI+@public.gmane.org> wrote: > >>Is there a Ruby script or library available to detect browser and >>operating system thru the user-agent header string? > > > Why do you want to do this? > > Please please please please please please don''t implement a site that > locks out certain browsers, or serves different HTML/CSS to different > types of browsers. >Won''t do that. It''s just for registering user''s data when there''s a tech support request on the website. rgds
On Thu, 12 May 2005 14:05:52 -0600, Rob Park <rbpark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: Demetrius,>On 5/12/05, Demetrius Nunes <demetrius-fDpYTK8McCzCdMRJFJuMdgh0onu2mTI+@public.gmane.org> wrote: >> Is there a Ruby script or library available to detect browser and >> operating system thru the user-agent header string? > >Why do you want to do this? > >Please please please please please please don''t implement a site that >locks out certain browsers, or serves different HTML/CSS to different >types of browsers.Following on from Rob''s posting, for a reason as to why this is the case, see here:- http://www.quirksmode.org/js/support.html Cheers, Andrew
On 5/13/05, Demetrius Nunes <demetrius-fDpYTK8McCzCdMRJFJuMdgh0onu2mTI+@public.gmane.org> wrote:> Is there a Ruby script or library available to detect browser and > operating system thru the user-agent header string?Why not write something that parses browscap.ini? browscap.ini is fairly comprehensive and regularly updated with the capabilities list. http://www.garykeith.com/browsers/downloads.asp Leon