lachlanhardy / mobile-pages-in-sinatra

A demo serving specific page to iPhone and Android devices
http://lachstock.com.au/code/mobile-pages-in-sinatra/
MIT License
6 stars 0 forks source link

Rewrite as Rack middleware #1

Open lachlanhardy opened 14 years ago

dougireton commented 14 years ago

Have you seen this? http://github.com/talison/rack-mobile-detect

lachlanhardy commented 14 years ago

I hadn't, thanks, but a significant part of my solution is that the URL does not change.

I might investigate using rack-mobile-detect to bring up different template files, though. That looks like it would make the discovery and identification of mobile devices much more comprehensive.

dougireton commented 14 years ago

See my example code here: http://stackoverflow.com/questions/2978126/in-sinatra-best-way-to-serve-iphone-layout-vs-normal-layout