Wilkie Martin - Surviving Publication

Author of the unhuman series of addictive comedy cozy mysteries set in the Cotswolds. This documents my encounters with publishing and includes things I hope will be useful later. It also covers some local writing competitions and reviews some writing events.

Wednesday, 13 January 2010

Adding a website icon for iphone and stopping page not found for mobiles

Looking through the website logs we have seen a number of 404 errors returned (for page not found) when attempts are made to access the file /apple-touch-icon.png, which is the icon used when the website is accessed from an iphone, and some errors when the iphone browser tries to access these /iphone/ and /mobile/ directories.

To prevent these errors we have created a new file called apple-touch-icon.png file, which holds an icon to be used for iphones. We put the file into the root directory of our website to see what effect this has on these 404 errors. It was built using a free 21-day licence for Microangelo Toolset from http://www.downloads.com/ by importing a picture file and saving the file as a .png file for a custom size of 57x57 pixels in 256 truecolor. Although there are some iphone emulators on the web so far we haven't found one that will test the .png icon.

Creating this file allows a common icon for the whole site. However various items on the web suggest that it is possible to add a different icon per page (using the command below embedded in the html for the page between the <head> and </head> statements and allowing a different icon for each.)

<link rel="apple-touch-icon.png" href="/pageicon.png"/>

To prevent the other page not found (404) errors on the directories we've put a block on these into our robots.txt file (see Starting an Author's platform where other settings in this file are given) by adding the following lines to the file:

User-agent: taptubot
Disallow: /iphone/
Disallow: /mobile/
Disallow: /m/
Disallow: /mobi/

Any comments on this or tips on different setups for mobile phones are welcome.

Or is there anyone with an iphone who'd like to access http://www.wilkiemartin.com/ and let us know what the icon looks like?

My Related Postings

Adding a guestbook
Add blog to website
Starting an author's platform

No comments:

Post a Comment