Leverage Browser Caching for Images, CSS and JS
The .htaccess file can be modified via FTP, or the File Manager in cPanel.
destination source:https://www.siteground.com/kb/leverage-browser-caching/
To leverage your browser\'s caching generally means that you can specify how long web browsers should keep images, CSS and JS stored locally. That way the user\'s browser will download less data while navigating through your pages, which will improve the loading speed of your website.
To enable it, add those lines to your .htaccess file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg \"access 1 year\" ExpiresByType image/jpeg \"access 1 year\" ExpiresByType image/gif \"access 1 year\" ExpiresByType image/png \"access 1 year\" ExpiresByType text/css \"access 1 month\" ExpiresByType application/pdf \"access 1 month\" ExpiresByType application/javascript \"access 1 month\" ExpiresByType application/x-javascript \"access 1 month\" ExpiresByType application/x-shockwave-flash \"access 1 month\" ExpiresByType image/x-icon \"access 1 year\" ExpiresDefault \"access 2 days\" </IfModule> ## EXPIRES CACHING ## |
The .htaccess file can be modified via FTP, or the File Manager in cPanel.
You find this article useful? Click here to learn more about joombig template and extension experts and what else we can do for you!
Related Article
destination source:https://www.siteground.com/kb/leverage-browser-caching/