Archived topic
Load time of page is significant longer from hook element
3 replies · Started by Carsten on March 17, 2021
Hi there, I wonder why the load time of my search page is significant longer from the hook element, than from the menu, it's like the page is not cached when using the link in the hook?
<span class="menu-bar-item">
<a href="/search"><?php echo generate_do_svg_icon( 'search' ); ?></a>
</span>
Hi there,
try replacing the function call with the actual SVG HTML:
<svg viewBox="0 0 512 512" aria-hidden="true" role="img" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em">
<path fill-rule="evenodd" clip-rule="evenodd" d="M208 48c-88.366 0-160 71.634-160 160s71.634 160 160 160 160-71.634 160-160S296.366 48 208 48zM0 208C0 93.125 93.125 0 208 0s208 93.125 208 208c0 48.741-16.765 93.566-44.843 129.024l133.826 134.018c9.366 9.379 9.355 24.575-.025 33.941-9.379 9.366-24.575 9.355-33.941-.025L337.238 370.987C301.747 399.167 256.839 416 208 416 93.125 416 0 322.875 0 208z"/>
</svg>
Hi there, no noticeable difference with this function call.
For some reason, the color of the svg is different than the rest, even if it is in the same class .menu-bar-item a svg?
Thanks
<span class="menu-bar-item">
<a href="/search"><svg viewBox="0 0 512 512" aria-hidden="true" role="img" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em">
<path fill-rule="evenodd" clip-rule="evenodd" d="M208 48c-88.366 0-160 71.634-160 160s71.634 160 160 160 160-71.634 160-160S296.366 48 208 48zM0 208C0 93.125 93.125 0 208 0s208 93.125 208 208c0 48.741-16.765 93.566-44.843 129.024l133.826 134.018c9.366 9.379 9.355 24.575-.025 33.941-9.379 9.366-24.575 9.355-33.941-.025L337.238 370.987C301.747 399.167 256.839 416 208 416 93.125 416 0 322.875 0 208z"/>
</svg></a>
</span>
Hi there,
The load time shouldn't be any different. You can install the Query Monitor plugin if you'd like to check for errors/slow queries.
As for the color, I'm not seeing any difference between that item and the others.
Let us know :)