views:

182

answers:

1

I'm going to develop a mobile version of my webapp. Most documentation I've read suggests one of the following approaches:

  1. create a separate domain (m.example.com)
  2. using conditional css style sheets, but serve the same html

I'd like to take a completely different approach. I'm using MVC, and would decide which template to render on the server side. My model and controller will be the same, the domain will be the same, but the html will be served differently for mobile users.

Has anyone tried this? Any pitfalls to this approach?

A: 

Perhaps you should take in consideration that the user might want to view the original site from his mobile phone.

The wonderful thing about option 1. (create a separate domain(m.example.com)) is that the user can choose between the original and mobile version.

A personal example is when using todoist. I don't like the mobile version but, they are not forcing me to use it.

Hope that helps!