Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-08-03 09:46:02

robpenfold
New Member
Registered: 2019-05-02
Posts: 4

Textpattern favicon

I’m playing around with Textpattern and like how fast it is

When I put my test site in GTMetrix to get a speed score, most things are good, but one thing that slows it down is that it cannot find the favicon and this leads to a 404 error. When I search the files I can see /public_html/textpattern/admin-themes/classic/assets/img/favicon.ico but cannot see how to fix this?
https://llicit.com/favicon.ico
ta Rob

Offline

#2 2019-08-03 09:54:16

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,261
Website

Re: Textpattern favicon

Hi Robpenfold.

Right. Noticed and reported to Devs: the default theme hasn’t any favicons in it’s distrubution.

You have 2 options:

  • Adding a fake favicon with this line into you <head> HTML document part:

<link href="data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQEAYAAABPYyMiAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAAF0lEQVRIx2NgGAWjYBSMglEwCkbBSAcACBAAAeaR9cIAAAAASUVORK5CYII=" rel="icon" type="image/x-icon">

Offline

#3 2019-08-04 03:55:15

robpenfold
New Member
Registered: 2019-05-02
Posts: 4

Re: Textpattern favicon

Thanks Patrick,

Have gone with the fake favicon option as that has fixed the speed problem
Have added your pat_speeder plugin also

ta, Rob

Offline

#4 2019-08-04 17:13:45

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 2,499

Re: Textpattern favicon

Perhaps I’m missing something obvious – if you have a bogus favicon that isn’t going to get much use in real terms, set a zero byte favicon.ico in the filesystem with a looooong expiry header and it’ll be cached by the browser after the first access. Right? I’m a bit rusty with these things, but that’s how it used to work.

Offline

#5 2019-08-04 19:37:24

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,271
Website

Re: Textpattern favicon

Or just delete the favicon call. As far as I know, favicons are not required by any validation or SEO services.

I like Patrick’s hack though:)


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#6 2019-08-05 04:45:28

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,261
Website

Re: Textpattern favicon

😉

It’s not my hack but a David Walsh’s one: https://davidwalsh.name/blank-favicon.

Sure favicons are not necessary for SEO or anything else but cause a trouble into your browser console if they are missing and it’s annoying.

Last edited by Pat64 (2019-08-05 04:46:38)

Offline

#7 2019-08-05 10:17:02

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 2,499

Re: Textpattern favicon

Pat64 wrote #318958:

Sure favicons are not necessary for SEO or anything else but cause a trouble into your browser console if they are missing and it’s annoying.

Another factor, perhaps related, is the effect on web server log files. Every client that requests a favicon that does not exist may write a line in a web server access or error log file. Over time, those lines add up to a considerable amount of log file storage.

Offline

#8 2019-08-05 13:38:11

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,261
Website

Re: Textpattern favicon

Thank you gaekwad: very interesting!

Offline

#9 2019-08-05 15:05:24

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,271
Website

Re: Textpattern favicon

So, what you are saying is that favicons are not served to but requested by the browsers?


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#10 2019-08-06 00:24:12

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,668
Website

Re: Textpattern favicon

Once upon a time the HTML spec, based on the practice of the Microsoft browser of the day, suggested that the browser actively look for a favicon in the root of the site. That text seems to have vanished ( although the HTML spec becomes more and more unreadable, I may have missed it). The site owner could/can serve a favicon from a different location, using the <link rel=icon />. Safari, Edge and Chrome do look for the existence of such an image in the root (favicon.*) – unless a different image is specified. And flag an error in their console, and fill the serve logs if the image does not exist.

That implies a slight slow down for the site while it searches for the non-existing image, as flagged in PageSpeed and similar tools. We’re talking milliseconds here, at best. Masssive!
(and filling the server logs with 404 errors may affect server performance on a much accessed site).

So yeah, if you have a popular site, and don’t care about the favicon, stick a 1by1px transparent GIF in the root of your server, or if cannot do that, use the code flagged by Pat64 above.

Offline

Board footer

Powered by FluxBB