Can someone please explain to me how I can display the Mobile Version of a website when visiting on my phone, and the Desktop Version when viewing on anything larger than 500px?
I have separately created both a Mobile Website and a Desktop Website. Is it possible to use jQuery to detect the width and determine which version to call?
This is what I have tried:
For the Desktop Version:
<link rel="alternate" media="only screen and (max-width: 500px)" href="../FolderPath/index.html" >
For the Mobile Version:
<link rel="canonical" href="../FolderPath/index.html">
I'm not sure if this approach is correct. Can anyone provide guidance? Thank you in advance :)