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.
Related
i need some help with linking css to a php file.
This was completed by someone else and now i need to fix it. We have the main css that controls the look and feel of the entire site. The other CSS is just for the accordions page. that needs to be added in.
Current links include:
<!-- CSS Linking -->
<link href="css/template.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/accord.css" rel="stylesheet" type="text/css" />
If i remove the ?php echo from the second one it doesn't work, but if i leave it in there the css/template.css doesn't work.
Basically if both are in there are the same time they one doesn't work. Is there are way to resolve this?
The answer was that in the css of the second file there was an element of code that was overwriting the other file. The people had a body element. This has been removed and now both working together well.
I am trying to change the favicon in my wordpress blog. I am still not able to do so. I am using the Magazine Basic theme.
The website I am working on is www.quantgreeks.com. When I type, http://www.quantgreeks.com/favicon.ico, I still get the HostGator symbol.
I have tried this and none working:
http://en.forums.wordpress.com/topic/how-do-i-change-my-favicon-1
http://codex.wordpress.org/Creating_a_Favicon
http://www.wpbeginner.com/wp-tutorials/how-to-add-a-favicon-to-your-wordpress-blog/
Added this two lines to header.php:
<link rel="icon" href="http://www.quantgreeks.com/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="http://www.quantgreeks.com/favicon.ico" type="image/x-icon" />
Not of any use..
Need some guidance...
You are doing the correct steps if you followed any one from those sources.
I checked your site and I believe the favicon is the letter 'J'? See screenshot:
The issue you're having is probably from an old cache in your browser. Try clearing your browser cache and try again.
i have this in the head of the document:
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
I read all I could about it here, but that didn't help and that's why I'm asking again. I'm positive that it wasn't a typo - PHP file_exists finds the ico file fine, but none of the browsers show it... What could be the reason? This domain is new but after I checked the DNS records they are refreshed and are OK. I cleared local cache and deleted tmp files... You can see it live at http://mybestday.eu
Favicons are stored in a special cache. That cache lasts a long time (days to weeks) and can't be cleared by clearing the normal content cache. You could test favicons on a remote computer (like browserstack) or just wait 'till the cache expires.
Or, see the next answers for (ugly) workarounds:
You can clear your favicon by forcing your browser to re-cache it using a cache buster:
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=2" />
Every time you change the image, change the version (?v=) to an increment (3, 4, ...).
Here is a related discussion on this issue: How do I force a favicon refresh
**So far i can see it works ;)
**
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
Like bjb568 told you, clean the cache.
I tried to add icon with code
<link rel="shortcut icon" href="<?php include($_SERVER['DOCUMENT_ROOT'].'/imageslogos /favicon.ico'); ?>" />
When I look at the source code it showed lots of ? a few letters and numbers
When I clicked on this it said
The requested URL's length exceeds the capacity
limit for this server.
How do I add the icon from document root
You shouldn't use the include function since the link tag needs a reference.
Try this
<link rel="shortcut icon" href="
<?php echo $_SERVER["DOCUMENT_ROOT"]."/imageslogos/favicon.ico"; ?>
"/>
I am stumped. I am using includes to import a style sheet. If I add a new style to the style sheet, generated pages will not display ANY of the new css. If I change an old css rule it WILL display the change. I thought it might be a cached file of some kind, but I have cleared the cache in all testing browsers and the problem persists.
At first I thought it was a WAMP issue, but the problem happens when I move it all live as well so now I am thinking I am doing something wrong with the includes....
<link rel="stylesheet" type="text/css" href="css/foundation.css">
<!-- Included Custom Overides -->
<link rel="stylesheet" type="text/css" href="css/Custon_Foundation_Overides.css">
<!-- Supersizer CSS -->
And this is simply my include...
<?php require("Includes/HEADER.php"); ?>
Again, all the old CSS works fine, just any new additions to any of the style sheets will not display.
Thanks
<link rel="stylesheet" type="text/css" href="css/Custon_Foundation_Overides.css">
Maybe "Custon_Foundation_Overides.css" is a typo and you meant "Custom_Foundation_Overrides.css" or maybe you have to upload the file with correct letters capitalization.
Sounds like a browser cache issue. A simple way to fix this while maintaining good caching practices would be to pass the file make time as a query var to the file.
<link rel="stylesheet" type="text/css" href="css/foundation.css?ver=<?php echo filemtime('css/foundation.css');?>">
This will generate a string like:
<link rel="stylesheet" type="text/css" href="css/foundation.css?ver=1382564850">
This way when you update the file your browser will think its a new file and cache that, but as long as the file remains unchanged it will have the same name and maintain the browser cache.