Streaming live at 10am (PST)

Mobile website(webflow) for customer with existing desktop site


#1

I'm designing a mobile only version on Webflow for a customer with a existing desktop site hosted by Hostgator, and their existing domain name is registered at GoDaddy. How do I coordinate with their hosting company/domain company to point the newly made mobile version(Webflow) when there mobile customers search for them on a mobile device?


#2

just to make sure I understand what you are asking...

if user has a viewport size > 1024, then go to hostgator hosted site
if user has a viewport size <= 1024, then go to webflow hosted site

is this correct?


#3

Exactly,

I was just thinking the portrait phone size of 767 pixels or less as the viewport size to go to Webflow hosted site and above that Hostgator where the current desktop site is.


#4

Easy. If you host both sites you can use jQuery to redirect to the proper page. Create a structure like

yourdomain.com
 index.html
 + mobile
 - - index.html
 + desktop
 - - index.html

Now. In index.html create jQuery script like so:

if($(window).width() >= 767) {
	window.location.replace("http://yourdomain.com/desktop/");
} else {
	window.location.replace("http://yourcomain.com/mobile/");
}

Or you could simply make a redirection if browser is smaller than something. Eg.

if($(window).width() < 767) {
	window.location.replace("http://m.yourdomain.com/");
}

Anyway, I think that making the whole site responsive would be a better solution.


#5