user3383267 user3383267 - 1 month ago 16
HTML Question

request desktop version through crome

I have a website that there is a code on the desktop version , you can see my site here : my website
and it is : if (screen.width <=400){window.location="http://m.designing-application.com/";}

so when the users come to my website with mobile from google or directly, they will be redirected to mobile version , however there is an option on chrome or firefox that they can request for desktop version through the browser, but when they click on it , the desktop version wont be opened ,

which solution do you have for me that clients can open desktop version by clicking on it?

Answer

I found the below answer , so I would like to share it here.

<link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.designing-application.com/" />
Comments