I have a very simple webpage:
<html>
<head>
<meta http-equiv="Refresh" content="0; url='https://www.website1.com'" />
</head>
<body>
</body>
</html>
Instead of this always redirecting to the same website, I would like to redirect to either website1 or website2 depending on if the user is on a mobile device or a browser on their computer. I am new to front-end web development, so any help you could provide would be much appreciated.
Thanks!
You should use Javascript for that. Check for device type based on the
userAgent
, and then redirect to the new website