Best Leverage Browser Caching Setting
-
Hi, What would you say was the best way to leverage browser caching? Through a plugin like W3 total cache plus other plugins or to directly edit the .htaccess file?
If the .htaccess file, what would be your ideal recommendation for the code?
Thank you
Also how did you sort the leverage caching for gravatar’s and contact form7 ? As it’s a problem on my site but not yours.
Hi,
This parameter was configured by our server administrator and it is not directly related to our theme. We suggest you to contact your hosting provider for help in this situation.
Our demo doesn’t have gravatar images. We didn’t perform any extra steps for contact form 7 either.
Regards
May I ask if you didn’t use gravatar images for the blog profile icon. How did you upload your own unique picture?
The blog element towards the bottom of the page; https://woodmart.xtemos.com/demo-cosmetics/demo/cosmetics/
We have changed this image with custom PHP code added to the functions.php file in the child theme
function woodmart_site_get_avatar($avatar, $id_or_email, $size, $default, $alt){
global $wp_query;
if ( is_object( $id_or_email ) && $id_or_email->user_id == 1 ){
$avatar = '<img class="avatar avatar-32 photo" src="IMAGEURL.jpg" height='.$size.' width='.$size.' />';
} elseif ( !is_object( $id_or_email ) && $id_or_email == 1 ) {
$avatar = '<img class="avatar avatar-32 photo" src="IMAGEURL.jpg" height='.$size.' width='.$size.' />';
}
return $avatar;
}
add_filter('get_avatar', 'woodmart_site_get_avatar', 10, 5);