WebPagetest Forums
Results not always as expected with mobile user agent - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Discuss Test Results (/forumdisplay.php?fid=4)
+--- Thread: Results not always as expected with mobile user agent (/showthread.php?tid=12457)



Results not always as expected with mobile user agent - hencha85 - 08-07-2013 02:53 AM

So I was just running some simple scripted tests.

I would pass along a mobile user agent and then follow up with a navigate command. I'd expect a mobile website in return but that's not always the case. Any thoughts?

Here's an example:

http://www.webpagetest.org/result/130806_KK_13Q3/


RE: Results not always as expected with mobile user agent - pmeenan - 08-07-2013 03:17 AM

That example looks like a mobile site that is stretched to 100% width. You probably also want to use setViewport to make the browser match a mobile aspect ratio and size.

That said, it still won't catch ALL sites - if they are doing js feature detection of some kind.


RE: Results not always as expected with mobile user agent - hencha85 - 08-07-2013 03:22 AM

Would it account for the inconsistencies when testing on the same site? I'm pretty new to web stuff in general but from a programming perspective, I'd think that I'd at least get consistent results. Would issues with javascript also cause something like that?

I noticed when looking at the response headers on the instances that it Doesn't work, 'User-Agent' in the 'Vary' header.

Are there usually inconsistencies when testing for redirection based on user-agent? Whether they used a regex or exact user agent matching, I'd, hopefully, get consistent results if I were to use the same user agent through my tests.. right?


RE: Results not always as expected with mobile user agent - pmeenan - 08-07-2013 03:27 AM

Hard to say without knowing the site specifically and how they are doing their detection. It's certainly unusual but not impossible. It's not uncommon to have a farm of servers powering a site so if a few are configured differently you could get different results with the exact same content (or the content itself could also change over time).