5

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');
Jesse Nickles
  • 1,435
  • 1
  • 17
  • 25

1 Answers1

4

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.

Shakil Hossain
  • 1,701
  • 13
  • 25