Click here to Skip to main content
15,886,860 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created a site and put in code on nearly every page that if the screensize <link rel="alternate" media="only screen and (max-width: 640px)" then it should go to the mobile version. I have a button go to main site on the mobile but it doesn't work because every time a user clicks on it i suppose this code is still there so it's going to the mobile site again. How do i overide the code of screensize?

Thanks so much for any help.
Posted
Comments
Andy Lanng 18-Nov-15 6:38am    
U need to add a cookie that tells the main site "redirectFromMobile". Add it when the user clicks the redirect link and ensure that the main site does not re-redirect if that cookie is present.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900