Shorter page-title for IOS-devices
If you are creating apple-touch-icons to the webpages you develop, this short JS-code can be handy. It shortens the page-title of your site, making it easier for people to add your site directly to their homescreen - without having to edit the title to a shorter one.
PS: IOS-devices only!
/*! Custom, short page-title for IOS-devices */
if( navigator.userAgent.match(/iPhone/i) ||
navigator.userAgent.match(/iPod/i) ||
navigator.userAgent.match(/iPad/i)
) {
document.title = "Short title";
}
Written by Axel Ferdinand Giæver
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Related Tags
#javascript
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#