We have developed a website which has general homepage and mobile page, one is for mobile and other is for PC.
I want code to detect the device automatically and navigate to the mobile homepage if the user is from mobile and navigate to the homepage(general) if the user is from PC and problem is it should be using JavaScript or plain HTML.