Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-07-18 16:53:12

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

404 for images

I get a number of 404s recently so I just noticed the particular recurring error

The page <txp:site_url />/apple-touch-icon-precomposed.png does not exist.

As png is not a page but an image is there a way for the error message to reflect that?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Online

#2 2011-07-18 17:04:57

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: 404 for images

You could create a custom error page with a message more to your liking.

Offline

#3 2011-07-18 17:08:10

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: 404 for images

Hi ruud

I do have a custom error page but how do I make it recognise the difference between an image and a page? Shouldn’t <txp:error_status /> and <txp:error_message /> recognize this difference?

Last edited by colak (2011-07-18 17:09:04)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Online

#4 2011-07-18 17:08:28

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: 404 for images

colak wrote:

As png is not a page but an image is there a way for the error message to reflect that?

It’s safe to say that no one will see any error message as it isn’t human browsing to that particular location. It just happens to be that all iOS devices (mobile Safari) look for that png from site’s root.

If I were you, I would create that image for your site as it’s used on Apple’s mobile devices as the homescreen’s bookmark icon.

Alternatively if you don’t fancy about images, and creating one for your site, you should block the request. Just like with favicon.ico, and other auto-fetched files, do not let Textpattern to handle the automatic requests, but let Apache to handle (block) it. You probably don’t want to waste server resources to something no one sees ;)

Basically you can extend the Textpattern’s .htaccess file to include apple-touch-icon-precomposed.png and apple-touch-icon.png in addition to favicon.ico.

Last edited by Gocom (2011-07-18 17:24:49)

Offline

#5 2011-07-19 07:15:18

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: 404 for images

Thanks Jukka

I have no smart mobile device so there is no way for me to check it but I’ll research about the specs for smart phone icons.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Online

Board footer

Powered by FluxBB