RSS

Apple – Specific Meta Tags & links for mobile web application

18 Jan

This post will describe about apple specific meta tags, links tags and when and how to use it in your website or mobile web application.

Introduction

The <meta> tag  are used to provide additional information (Metadata)  about the web page, most often to help search engines categorize them correctly when indexing. They are inserted into the Head section of the HTML document, but the information stored in the meta tag isn’t visible to a user visiting the site but it can be used by search engines & browsers to display content or reload page.

Usage of Meta Tags

Meta elements are typically used to specify page description, keywords, the content language, author of the document, last modified,technical formats,pointers to other files such as News Feeds and Fav icons and any other metadata not provided through the other head elements and attributes.

The following are some of the most important operations that we can done by using meta tags in iOS devices:

Enable Full Screen
It is used to set whether a web application runs in full-screen mode.

< meta name=”apple-mobile-web-app-capable” content=”yes”>

If content is set to yes, the web application runs in full-screen mode; otherwise, it does not.

Note:The content attribute must be defined if the name or the http-equiv attribute is defined. if none of these are defined, the content attribute cannot be defined.

Setting Status Bar Style

It is used to set the style of the status bar for a web application in iOS.

< meta name=”apple-mobile-web-app-status-bar-style” content=”default”>

1) If you specify content as default, the status bar appears normal.

2) If you specify content as black, the status bar appears in black color.

3) If you specify content as black-translucent, the web content is partially obscured by the status bar and it appears in black color and translucent.

Phone number detection:

By default, Safari on iOS detects any string formatted like a phone number and makes it a link that calls the number.

You can enable or disable the  automatic detection of phone numbers in iOS safari  by using the following meta tag in your html file.

< meta name=”format-detection” content=”telephone=no”>

By giving telephone=no, to disable this feature and yes to enable this feature.

Changing viewport size:

Viewport meta key is used to set the width and height of the viewport. It is used to improve the presentation of page while displaying  on iOS.

Viewport meta key has supported the following six properties.

1) width :used to specify width of the viewport in pixels.

< meta name = “viewport” content = “width = device-width”>

device-width represents the width of the device in pixels.

2) height: used to specify height of the viewport in pixels.

3) initial-scale:  used to specify initial scale of the viewport.

< meta name = “viewport” content = “initial-scale = 1.0″>

4) minimum-scale: Specifies the minimum scale value of the viewport. The default is 0.25. The range is from >0 to 10.0.

5) maximum-scale: Specifies the maximum scale value of the viewport. The default is 5.0. The range is from >0 to 10.0.

6) user-scalable: Determines whether or not the user can zoom in and out.Set to yes to allow scaling and no to disallow scaling. The default is yes.

< meta name = “viewport” content = “width = 320, initial-scale = 2.3, user-scalable = no”>

Link Tags for Homescreen Icons

Apple provide the option to users to  save the page to home screen, While browsing online with safari an Apple device like iPhone, iPad, and iPod touch. This option is  used to access that page without having to launch their browser. By default, Apple will use the screen shot of the web page when creating a home screen icon, which often looks like a white square.

Apple also provided a option for site owners to  use their custom icon instead.

It can be achieved by using Apple touch icon. It is  very similar to favicon for Apple mobile devices. So you can set an Apple Touch Icon for your website just like you can set a favorite icon.

There are two kind of icons:

1)Icon with Glossy effect (Standrand Icon)

To use a standard icon, add the following link tag  into the head section of your website

< link rel=”apple-touch-icon” href=”" />

2)Icon without Glossy effect (Precomposed Icon)

To use a precomposed icon, add the following link tag into the head section of your website

< link rel=”apple-touch-icon-precomposed” href=”" />

To include the different size of  apple touch icon:

< link rel=”apple-touch-icon-precomposed” sizes=”72×72″ href=”" />
< link rel=”apple-touch-icon-precomposed” sizes=”114×114″ href=”" />
< link rel=”apple-touch-icon-precomposed” sizes=”144×144″ href=”" />
< link rel=”apple-touch-icon-precomposed” sizes=”512×512″ href=”" />
< link rel=”apple-touch-icon-precomposed” sizes=”1024×1024″ href=”" />

Link Tag  for Startup image (Splash screen):

splash screen is an image that appears while page or program is loading. It may also be used to describe an introduction page on a website.

To implement the startup page in your website add the following link tag in your head section.

<link rel=”apple-touch-startup-image” href=”../startup.png” />

To include the Startup image with various sizes:

<!– iPhone –>

<link rel=”apple-touch-startup-image”  media=”(device-width: 320px)”

href=”apple-touch-startup-image-320×460.png”>

<!– iPhone (Retina) –>

<link rel=”apple-touch-startup-image”  media=”(device-width: 320px)

and (-webkit-device-pixel-ratio: 2)”  href=”apple-touch-startup-image-640×920.png”>

<!– iPad (portrait) –>

<link rel=”apple-touch-startup-image” media=”(device-width: 768px)

and (orientation: portrait)” href=”apple-touch-startup-image-768×1004.png”>

<!– iPad (landscape) –>

<link rel=”apple-touch-startup-image” media=”(device-width: 768px)

and (orientation: landscape)” href=”apple-touch-startup-image-748×1024.png”>

<!– iPad (Retina, portrait) –>

<link rel=”apple-touch-startup-image” media=”(device-width: 768px)

and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)”

href=”apple-touch-startup-image-1536×2008.png”>

<!– iPad (Retina, landscape) –>

<link rel=”apple-touch-startup-image” media=”(device-width: 768px)

and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)”

href=”apple-touch-startup-image-1496×2048.png”>

I hope this post will helpful for you.Thanks for your time.

Share it with your friends!

About these ads
 
15 Comments

Posted by on January 18, 2013 in General, HTML5, iOS, Sencha Touch

 

Tags: , , , , , , , , , , , , , , ,

15 Responses to Apple – Specific Meta Tags & links for mobile web application

  1. chicao

    January 22, 2013 at 6:01 pm

    very good most of your articles, many years of quality posts, i admire you in many things and i disagree in others, but still love your posts.

     
  2. Cleide_docinho

    January 23, 2013 at 1:38 am

    ciao! thanks for that kind of information, it really help me a lot! thanks!!!

     
  3. Carolinepacheco

    January 24, 2013 at 3:47 pm

    i totally agree with what’s been written here. thank you for providing and sharing the post.

     
  4. Carolynagomes

    January 24, 2013 at 6:09 pm

    i like your articles so much. please try to post them more frequently.

     
  5. Carol_alves_25

    January 24, 2013 at 10:18 pm

    admiring the time and effort you put into your blog and detailed information you offer!

     
  6. chaotenbaby

    January 25, 2013 at 5:51 am

    this is the first time i am hearing of this. thanks for the information.

     
  7. Chiquinhaloca

    January 25, 2013 at 2:43 pm

    brilliant article. keep sharing.

     
  8. custom portrait

    January 28, 2013 at 3:20 am

    Hi there! I simply would like to offer you a big thumbs up
    for your excellent information you have got here on this post.
    I am returning to your website for more soon.

     
  9. lawerence_cress

    January 29, 2013 at 5:43 am

    I’m not that much of a online reader to be honest but your blogs really nice,
    keep it up! I’ll go ahead and bookmark your site to come back in the future. Many thanks

     
  10. wiggum

    January 29, 2013 at 1:43 pm

    you inspire me, thanks.

     
  11. Lorenzogomez

    January 29, 2013 at 4:05 pm

    Its such as you learn my thoughts! You seem to know a lot about this, like you wrote the ebook in it or something.
    I think that you simply could do with some p.c. to drive the message home a
    little bit, however other than that, this is fantastic
    blog. An excellent read. I’ll definitely be back.

     
  12. carioca_nf

    January 31, 2013 at 6:26 pm

    this is amazing!

     
  13. ciganaestrela

    January 31, 2013 at 9:35 pm

    really impressed! everything is very open and very clear explanation of issues. it contains truly information. your website is very useful. thanks for sharing. looking forward to more!

     
  14. cassym

    February 2, 2013 at 6:17 pm

    thanks for taking the time to discuss this, i feel strongly about it and love learning more on this topic. it is extremely helpful for me.

     
  15. carlinh

    February 5, 2013 at 2:59 pm

    hey friend, i liked your article so much i even bookmarked it here. cheers.

     

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 )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: