Link to home
Start Free TrialLog in
Avatar of tofat
tofat

asked on

Website to detect user using mobile phone and redirect to mobile site

I want to create a separate mobile site with less images and faster loading than the main website. How can I get the page to detect the user is viewing the page on a mobile phone and then automatically redirect them to the mobile version of the site i.e.: www.mysite.com/mobi/
Avatar of Brian Pringle
Brian Pringle
Flag of United States of America image

This is not the best way to handle this type of site any more.  Consider using CSS to turn elements on and off based on the size of the screen instead of the browser type.  This is called "Responsive Web Site Design".

http://www.w3schools.com/html/html_responsive.asp

https://msdn.microsoft.com/en-us/magazine/hh653584.aspx
Avatar of tofat
tofat

ASKER

Hi Brian,

Yes, I am aware of responsive sites and I have a few but for this site I specifically want to create a mobile version which must differ slightly from the pc full version.
ASKER CERTIFIED SOLUTION
Avatar of mankowitz
mankowitz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tofat

ASKER

Hi Ray,

Thanks for your feedback. The reason for the mobile site is that I want it to be 95% text based because it will be mainly for people in rural areas who rely solely on mobile data and don't have fixed connections. The full site is for people who have the luxury of internet at home and can look at the site from a PC. I am trying to create a mobile version that uses as little mobile data as possible, so few to no images etc. I normally use bootstrap to create responsive sites. This is a once off thing that I am doing at the moment.
i agree with all of the other experts opinions as well, it's bad practice to create two versions of the same site. I also wanted to just note that you will probably be penalized for SEO if you have the same content on two different pages.

just something to ponder
Avatar of tofat

ASKER

Okay. So how can I do what I am trying to achieve without creating a mobile version?
best place to start would be to look at Brian's comments to learn the basics.

Then start implementing those ideas and when you get stuck, google or ask questions here on EE :)

If time is tight, consider using EE Gigs to speed up the process.
Avatar of tofat

ASKER

Alright, I get the message, haha. I am still going to give mankowitz the majority of points as he did give me a solution to my question. I will also give some points for sound advice.