While working in my own website, I'm facing a delay loading time (based on waterflow) for my site's favicon. I tried lots of way to reduce to waterflow delay but failed to manage it. After spending over 3 hours, I've figure out this solution which solve the problem like magic!!
Step 1: Convert favicon into a data-URI ( you can create it from here ) Step 2: Replace your existing favicon with the following code ( use it in function.php or child function)
function add_favicon() {
echo '<link rel="shortcut icon" type="image/x-icon" href="data:image/x-icon;base64,AAABAAEAICAAAAAAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAgBAAAAAAAAAAAAAAAAAAAAA.......=" />';
}
add_action('wp_head', 'add_favicon');
It`s effective for the icon but it reduces a little when you used image formate like jpg png etc. Buts still its good solution for optimization.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With