Menu

How To Optimize Browser Cache for Performance

Benefits of browser cache and GZIP

Browser caching is a simple way to make websites load faster and work better for people who visit the site more than once. It saves parts of the website like images and scripts on the visitor's device. This means the website doesn't have to load everything from scratch each time, which makes it faster and reduces the burden on the server.

GZIP compression makes files smaller before they are sent over the internet. This makes the files quicker to transfer, so web pages load faster. Turning on GZIP compression can cut down how long it takes for a page to load and also reduce the amount of data used, making the browsing smoother and more efficient.

Using both GZIP compression and browser caching together can speed up your website, reduce bandwidth usage, and make visiting your site a better experience. It's a good idea to enable these features to help your website perform at its best.

 

Configuration instructions

  • From the module configuration page, navigate to the “Cache and minification > Browser cache & GZIP” page.
  • Turn on the “Enable browser cache and Gzip” switch to activate this feature.
  • Choose between applying default PrestaShop settings for browser cache or customizing cache lifetime for each browser cache element individually.
  • If you enable the "Use default PrestaShop settings" option, all browser cache elements will follow predefined lifetime values:
    • Browser cache image lifetime: 1 month
    • Browser cache icon lifetime: 1 year
    • Browser cache CSS lifetime: 1 week
    • Browser cache JS lifetime: 1 week
    • Browser cache font lifetime: 1 year
  • If you turn off the default option, you can customize the cache lifetime for each browser cache element to meet your specific needs. This gives you the flexibility to set your cache duration, allowing for greater control over browser caching behavior.
  • Finally, save your changes.
Tổng lượt xem: 212 lượt xem