I'm using this code to direct the users from desktop version to my mobile site.
if (screen.width < 480) {
document.location = "Path of Mobile Page"
}
i would like to give the users the option to switch back to desktop version (may be using an anchor saying "View Desktop Version") from the mobile website, but this code will redirect them back to mobile site. I was wondering if i can make url to stay for Desktop page after user clicks anchor. My knowledge of jquery is limited so any help would be greatly appreciated.
I guess I'm new, so I wasn't able to make my question clear, so I am explaining it again.
I have two seperate pages, index.html and index1.html, user only knows index.html. When index.html is viewed on mobile device, it redirects to index1.html (so detecting mobile device is not an issue). Now there is a link in index1.html which have href="index.html" but, when I click this link index.html detects its a mobile and again redirects it back to index1.html. This is what I want to avoid, once user clicks the anchor to view index.html, it should not redirect back to index1.html. For first time when users type index.html I've used above mentioned code to redirect it to index1.html
Thanks