简体   繁体   中英

How Do I Leverage Browser Caching With Blogger?

I have a custom domain and I currently host my blog on Google and my custom website domain is through Google domains. I'm referring to the specific feedback I received from my Google page speed insights. When I click on the link to see which photo the speed test is referring to I receive an error message. I've tried to paste below the links but it won't let me , but you can see them from the snapshot for convenience; hopefully, someone can help me out.

Consider Fixing:

Leverage browser caching

Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.

Leverage browser caching for the following cacheable resources: Snapshot

Unfortunately Blogger doesn't allow to manage HTTP headers.

Focus on optimizing all the static and dynamic resources that you can handle directly (HTML, CSS, images, JS).

To overcome the leverage of browser caching is open Blogger dashboard then select Theme, Click Edit HTML button and add below code just below

<include expiration='7d' path='*.css'/>
<include expiration='7d' path='*.js'/>
<include expiration='3d' path='*.gif'/>
<include expiration='3d' path='*.jpeg'/>
<include expiration='3d' path='*.jpg'/>
<include expiration='3d' path='*.png'/>

Once added, Save the theme. Check here for more; https://www.problogbooster.com/2015/05/add-expires-headers-to-blogger-wordpress-htaccess-file-speedup-page-loading.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM