10

I have long web page title and when adding to home screen in iPhone older versions the whole title is visible in the confirmation dialog. When I add to home screen in iPhone 4 the title is cut off after the 12th symbol. Is there a way to stop this cutting so iPhone is showing the full title by default?

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Phil
  • 1,200
  • 13
  • 17

4 Answers4

22

Apparently there will be a undocumented meta tag

<meta name="apple-mobile-web-app-title" content="Title">

in iOS 6 to solve that issue.

Daniel Herzog
  • 321
  • 2
  • 3
11

No, there is no way to prevent that. Application names on the home screen are limited to a maximum of 12 characters. Anything beyond that will be truncated by placing an ellipsis in the middle of the name.

You will need to keep the title of your website under 13 characters on the iPhone if you want to prevent it from being cut off. See the other answers for possible ways of doing that.

Update: As of iOS 6, you can use a meta tag to set the name of your application as displayed on the home screen. Full details and instructions are available here.

Community
  • 1
  • 1
Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
  • 4
    Since the iPhone / iPad don't use fixed width fonts, this number can vary. – Timothy Lee Russell Nov 02 '11 at 16:34
  • Have downvoted because as of iOS6, it is possible to change, see http://stackoverflow.com/questions/3400741/setting-home-screen-icon-name-for-mobile-safari – brendo Apr 12 '13 at 01:38
  • 1
    @brendo What a strange reason to downvote. The answer was correct when I wrote it over two years ago. iOS 6 hadn't been released yet. You might consider editing the answer instead to add a link to the new question and updated information. – Cody Gray - on strike Apr 12 '13 at 04:24
  • Apologies, I didn't look at the dates of the posts. A mistake I won't make again! Just an FYI, as I do not have enough reputation, I cannot edit an answer. Still, your point stands, I should not have downvoted. I have removed the downvote for this answer. – brendo Apr 14 '13 at 22:54
10

Use a short Page Title with this code:

<script type="text/javascript">
  if( navigator.userAgent.match(/iPhone/i) || 
      navigator.userAgent.match(/iPod/i) || 
      navigator.userAgent.match(/iPad/i)
    ) {
         document.title = "Short title";
      }
</script>

But you cannot use the full title.

woodleader
  • 923
  • 1
  • 5
  • 14
0

You can change the title for iOS devices as woodleader has answered but this will change it in normal mobile safari. Only the user can change the title of the webapp. It's not possible to do it with meta tags or programmatically. So you just need to choose a shorter title or leave it up to the user, who will likely change it, if it is too long.

Jonathan.
  • 53,997
  • 54
  • 186
  • 290