Page 1 of 1

Mobile site not working

Posted: Tue Jul 09, 2013 3:52 pm
by dmurphy4
I'm waiting until after my new RC5 deployment before I work on the mobile site. But until then, I'm trying to plan for mobile development.

I switched everything to enable the mobile view but no dice. I still see the style.css in the header and no mobile.css. I remember the mobile was correctly changing over when we were on RC4.

So my question is - what triggers the mobile site after the mobile settings have been turned on? Device width?

Shrinking my browser window does not trigger the mobile site as I remember it did when we were on RC4.

Re: Mobile site not working

Posted: Wed Jul 10, 2013 4:17 am
by jmestep
Able looks at the UserAgent of the browser to detect whether the browser is mobile or not. Here are some browser UserAgents that match, from Able's source code.
private static Regex _mobileAgents1 = new Regex(@"android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|meego.+mobile|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino", RegexOptions.IgnoreCase | RegexOptions.Multiline);

Re: Mobile site not working

Posted: Wed Jul 10, 2013 7:28 am
by dmurphy4
Thanks for the clarification Judy. Does anyone know of a good emulator to test locally with? I can't use cloud-based emulators because the dev site can only be viewed within the network.

Re: Mobile site not working

Posted: Wed Jul 10, 2013 7:34 am
by mazhar
dmurphy4 wrote:Thanks for the clarification Judy. Does anyone know of a good emulator to test locally with? I can't use cloud-based emulators because the dev site can only be viewed within the network.
You can give Opera Mobile Emulator 12.0 Windows a try.
http://www.filewatcher.com/m/Opera_Mobi ... 256-0.html

Re: Mobile site not working

Posted: Wed Jul 10, 2013 7:50 am
by Katie
I have used this mobile emulator for testing. It seem to work good.

http://www.opera.com/developer/mobile-emulator

Re: Mobile site not working

Posted: Wed Jul 10, 2013 7:51 am
by Katie
Forgot to refresh my browser...looks like Mazhar just posted the same info before me. :)

Re: Mobile site not working

Posted: Wed Jul 10, 2013 7:54 am
by dmurphy4
Downloaded the Opera Mobile Emulator. Seems to work great. Thanks!

Re: Mobile site not working

Posted: Wed Jul 10, 2013 8:38 am
by dmurphy4
Okay - I found the User Agent Switcher plugin for firefox
https://addons.mozilla.org/en-us/firefo ... -switcher/

This is way faster than the Opera Mobile Emulator and I can also use firebug.

It basically tricks the website into thinking the browser is a certain user agent. So it's not a true emulator but definitely makes my job a lot easier.