homepage Welcome to WebmasterWorld Guest from 54.211.7.174
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Mobile Internet / Mobile Web Site Design and Development
Forum Library, Charter, Moderator: open

Mobile Web Site Design and Development Forum

    
Mobile redirect same url - different HTML
Fingers68




msg:4640970
 10:39 am on Jan 29, 2014 (gmt 0)

Hi Folks

I am succumbing to making a mobile version of our site from a users point of view, and obviously the search engines.

Here's my thoughts

Use the same URL and htaccess will redirect to the mobile %{HTTP_USER_AGENT} device to the mobile version which has different html (I am not using CSS you change the layout).

First problem is if the user prefers the desktop version is there a way to set a cookie to change the useragent? Or just not care, your on a moblie device and his is what your getting, like it or not?

How do the search engines see this, same URL different HTML, what trickery is this do they not say?

 

Fingers68




msg:4641024
 3:15 pm on Jan 29, 2014 (gmt 0)

Sorted the Search engine question, header must have;

Vary: User-Agent

lucy24




msg:4641083
 8:58 pm on Jan 29, 2014 (gmt 0)

if the user prefers the desktop version is there a way to set a cookie to change the useragent? Or just not care, your on a moblie device and his is what your getting, like it or not?

"Like it or not" may not be the optimal business decision. The cookie itself doesn't need to say anything about the UA. The basic structure is

if {user-agent is suchandsuch}
  then check-for-cookie
  if {cookie doesn't say leave-me-alone}
    then serve mobile version of HTML

That's assuming a negative cookie "don't redirect me", so your action is the same if the cookie is absent (including first-time visitors). If you prefer a positive "do redirect me", then don't redirect by default.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Mobile Internet / Mobile Web Site Design and Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved