- Write the URL of your website.
- Insert the following JS code on your website, the domain will redirect to Mobile URL when the screen width is equal or less than 699px.
We can use with "user-agent" approach. The advantage of "user-agent" detection is that we can customize for many devices.
Here’s the "user-agent" detection for iPhone and iPod:
CSS @media Method
We can use the CSS @media method for the detection of browsers.
We should implement two CSS @media - "screen" and "handheld" in the <head> section:
<link rel="stylesheet" href="screen.css" media="screen"/> <link rel="stylesheet" href="handheld.css" media="handheld"/>