0

I am having trouble fully implementing solution to question How do I force a favicon refresh?.

Current header.php is not refreshing the favicon as intended:

<link rel="shortcut icon" type="image/x-icon" href="...favicon.ico?v=2" />
<?php favicons(); ?>

I do not understand the role of the second line. I have found that adding a character to the end of the second line forces the favicon refresh (good!) but also displays a new line of text—whatever * is in below example—at the very top of the website (not good):

<link rel="shortcut icon" type="image/x-icon" href="...favicon.ico?v=2" />
<?php favicons(); ?>*

What is the role of the second line? How should it be formatted to force the favicon refresh without displaying a new line of text at the top of the website?

Thank you for your consideration, please let me know what other context I can provide.

  • The second line is a HTML comment (everything between ``). If you change the end of it (`-->`), you "open" the comment to include everything following it - maybe the whole code - until there's another closing comment. Try to remove the beginning of the comment syntax, too. Otherwise there will be no effect client-side of whatever `favicons()` does. – bkis Feb 21 '19 at 18:31
  • Thank you @mumpitz - I edited the HTML comment out of original post (the same error persists without it). – infowetrust Feb 21 '19 at 20:08

0 Answers0