160 likes | 282 Vues
Mobile Finder. By Monica Yarbrough. Google’s Suggestions for SEO. Vary HTTP Header Annotations within the HTML: On desktop page: <link rel =“ alternate ” media=“only screen and (max-width: 640px)” href =“http://m.example.com/page-1” > On mobile page:
E N D
Mobile Finder By Monica Yarbrough
Google’s Suggestions for SEO • Vary HTTP Header • Annotations within the HTML: • On desktop page: • <link rel=“alternate” media=“only screen and (max-width: 640px)” href=“http://m.example.com/page-1” > • On mobile page: • <link rel=“canonical” href=“http://www.example.com/page-1” > • Media queries https://developers.google.com/webmasters/smartphone-sites/
How Mobile Finder Works • Use both desktop and mobile useragents • Look for: • Redirect • Different content • Different stylesheets • Media queries
How Mobile Finder Works • Change the url to fit common mobile url patterns ex: www.t-mobile.comm.t-mobile.com
PhantomJs • Headless WebKit (browser) • Well-known and widely used • Used to get the content of a page • Takes snapshots of the sites it visits • Scriptable with coffeescript or javascript
Web Service • Query string with 2 parameters • url (required) • useragent(optional) • http://cs.harding.edu/mobilefinder/service.php?url=URL&useragent=USER_AGENT • Default useragent = Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7 (compatible; mediaqueries/1.0; +http://cs.harding.edu)
Results <MobileFinder> <url>http://www.cnn.com/</url> <mobileUrl>http://www.cnn.com/</mobileUrl> <reason> <code>400</code> <message>differing content</message> </reason> <useragent> Mozilla/5.0 (Android; Linux armv7l; rv:9.0) Gecko/20111216 Firefox/9.0 Fennec/9.0</useragent> <timeAccessed>2013-07-20 15:23:42</timeAccessed> <error/> <MobileFinder/>
Limitations • Crashing • Inconsistent results • Problems executing javascript redirection • Falsely fails when it actually gets the content • Fails to get url of page accessed • Slow
Limitations • Client-side Redirects www.golferen.no/wip4/(right) www.ng.kz/ (below)
Analysis Results • Accuracy (of 100 random hand-checked results) • 96 % accurate overall • 1 % inaccurately record not found when there is in fact a mobile version • 3 % inaccurately say mobile found when there is not a mobile version
Are Google’s Suggestions Used • 28 % found a mobile version following Google’s suggestions • 85 % found as having some sort of mobile version
Are Google’s Suggestions Used • 28 % found following Google’s suggestions • Of the 82% that were found as not following the rules: • 93% missing vary HTTP header • 89% missing alternate and canonical links
Are Google’s Suggestions Used • 28 % found following Google’s suggestions • 85 % found as having some sort of mobile version • Redirect: 35% • ‘Significantly’ different content: 28% • Stylesheetsalone: 9% • Stylesheetsand media queries: 11% • Media queries alone: 6% • Differing urls (trial and error): 11%
End Result • As a whole, mobile web pages do not adhere to Google’s standards • There are no truly consistent ways for finding a mobile version of a site