Leverage Browser Caching

Hi

I am using sydney theme for my website www.beamamma.com. When i am testing speed of pages from google, then google is telling to do caching of following resources.

http://beamamma.com/wp-content/themes/sydney/fonts/fontawesome-webfont.ttf?v=4.7.0 (2 Days)
http://beamamma.com/wp-content/themes/sydney/fonts/fontawesome-webfont.woff?v=4.7.0 (2 Days)

Kindly help to resolve the issue so that page load speed can be reduced.

Regards
Shobit Gupta
India

Hello there,

You would need to exclude the bundled Font Awesome fonts from your site and load it from free CDN source instead. Here is the simple PHP function which does this.


add_action('wp_enqueue_scripts', 'sydney_child_dequeue_scripts', 999);
function sydney_child_dequeue_scripts() {
  wp_dequeue_style('sydney-font-awesome');
  wp_enqueue_style('cdn-font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
}

Add it to your child theme’s functions.php file. Or, you can use the functionality plugin like Code Snippets without child theme.

Regards,
Kharis