Site icon Css3 Transition

Leverage Browser Caching for Images, CSS and JS in WordPress via .htaccess File

Leverage Browser Caching for Images, CSS and JS in WordPress via .htaccess File


We need  to Leverage Browser Caching for Images, CSS and JS in a website to increase browsing speed and to achieve that in WordPress we mostly use a plugin. An Plugin can create extra overhead in terms of keeping it updated and additional maintenance for a webmaster. Caching can be achieved easily with use of .htaccess file in WordPress.  Add below code in .htaccess file and upload it on root of your WordPress Installation. We are good to go without use of a plugin for this.

Steps To Leverage Browser Caching in WordPress with .htaccess

Find .htaccess File in Website Root Directory and add below code at the end of your file –

Code For Minify HTML, Javascript and CSS in WordPress without Plugin.

Find functions.php File in Website theme Directory and add below code in your file –

 

Exit mobile version