Java Script for redirecting

Hi

I am using a java script to redirect from my website if it detects a mobile site by using less than 600 pixels

Can I add a java script to my mobile site so it will redirect them to my my main desktop site if greater than 600 pixls and what would it be.

Quentin

window.location

You would need to make sure the browser support JavaScript before trying it though

Hi Quentin,

Better to just have a link from your mobile back to your main site, that way people have the choice.

Also - Back on your main site, check the http_referer and if they’re coming in from the mobile site (or your main site) then dont redirect them to the mobile site. This breaks the redirection loop.

Cheers
Richard