Mobile

Small Device Detection

Since so many people view websites with their mobile device now, you may want to have a different version of your website. You can add code to the top of your page that sees if the user’s screen is smaller than what your website was programmed to view at and if it is, redirect them to your mobile site. The code to check is below. Be sure to change “xyz” to your domain name.

<script type=”text/javascript”>
<!–
if (screen.width <= 699) {
document.location = http://www.xyz.mobi;
}
//–>
</script>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s