View Single Post
  #104  
Old 10-17-2013, 07:37 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: xMobile - Smartphone mobile template

Quote:
Originally Posted by DavyMac
The cloud of confusion around the use of the vary header makes it difficult to know for sure what the risks of using user-agent actually are!

I'm no expert on this, but my understanding of the Vary header is that it is relatively simple:

It tells the visitor (search engine) that the content will vary based on user agent. It is up to xcart to send the appropriate content (template and all associated includes) based on user-agent, or in our case with xmobile, screen size.

I don't think browser caching is an issue for us -- because we are serving DIFFERENT content to smartphone vs. desktop.

Same for CDN static content -- I think -- because it's a DIFFERENT css file.

xMobile does the device check in file, /modules/TXS_XMobile/init.php
(unfortunately for us this is encrypted, and we can't set parameters)
So xcart is serving different content based on screen size.

Vary user-agent header tells the browsers (search engines) that there WILL be different content depending on the browser/device -- but I don't think it prevents content from loading or being used. The cdn cache only serves what it is being asked for. IF mobile, it serves mobile css. IF desktop it serves desktop css. I am not sure the gitgub thread has anything to do with what we are doing here. I think.

I have an email out to my contact at Google.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote