homepage Welcome to WebmasterWorld Guest from 107.21.163.227
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Website
Visit PubCon.com
Home / Forums Index / Mobile Internet / Mobile Web Site Design and Development
Forum Library, Charter, Moderator: open

Mobile Web Site Design and Development Forum

    
Redirecting users to mobile version of site
DigitalSky




msg:4590019
 7:46 pm on Jul 3, 2013 (gmt 0)

I wasn't sure what forum this belonged in but here's the issue I'm having...

I am using the following code in my websites pages...


<!-- CSS -->
<script type="text/javascript">
<!--
if (screen.width <= 699) {
window.location = "http://m.example.org/";
}
//-->
</script>
/>
<!-- CSS -->


That code determines the screen width and if it's less than a certain amount it redirects the user from the main desktop site to the mobile version of the site. It works perfectly, however there is one issue...

When the user clicks the 'View Full Site' button on the mobile site it takes them to the full site but then loops them right back to the mobile version since it has determined their screen width is too small.

Is there a way I can remedy this because it seems to be eluding me...

[edited by: bill at 1:09 am (utc) on Jul 4, 2013]
[edit reason] use example.org [/edit]

 

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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved