Give mobile visitors a way to quickly access your company phone number, email, or just directions to the office.
Why Have a Landing Page?Having a mobile specific layout allows on-the-go visitors to quickly access to telephone numbers, email addresses, and directions â" exactly the sort of thing a visitor from a mobile device might be there for.
This tutorial isnât about creating an entire mobile version of your site, although some of the stuff youâll see here today can be used for exactly that. Instead, this is a means of offering a quick introduction to visitors from the mobile world before passing them through through to your main site.
The Goal Getting StartedTo make this easy, I have provided a mobile template for you to download, which means that all we will have to do is set up redirects for mobile browsers. You can customize the template landing page however you see fit â" itâs just standard HTML/CSS.
Hereâs what you need to do to get started:
On the index page of your site, in the <head> section paste in the following lines:
<script type="text/javascript" src="js/redirection_mobile.min.js"></script> <script type="text/javascript"> SA.redirection_mobile ({param:"isDefault", mobile_prefix : "m", cookie_hours : "1" }); </script>This will send any visitor that arrives on the index page to the subdomain âm.website.comâ, but only once every hour. If they press the link on the template page that says âcontinue to full siteâ, they will not be redirected within the defined timeframe.
Thatâs pretty much it. Congratulations, you have a mobile landing page â" now go forth and customize.
Note: If you are redirecting to a specific page rather than a subdomain you can do this by including mobile_url : âwebsite.com/mobileâ and mobile_prefix : âhttpâ. Refer to the documentation for further explanation.
Additional Notes Fitting to ScreenYou may have noticed the following meta tag in the downloadable files for this tutorial:
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=false;" />This is the tag that determines how the page fits to the screen and if a visitor can zoom in and out. Mozilla does a fine job of explaining this in great detail, check out their page on the viewport meta tag for a more rigorous exploration.
Further iOS ReadingFor more information regarding possibilities on iOS, check out the Safari Web Content Guide. Some nice ones to start with include their viewport and text size adjustment pages.
Powered By WizardRSS