Tuesday, September 25, 2018
AliDropship is the best solution for drop shipping

Enable browser cache and gzip compression to htaccess

Now we are going to learn how to create browser caching in .htaccess file, here in the below code we are simply adding the type of the file needs to be cached,you all think why we need to add this type? simple when a user access particular web page which loads very fastly in most website,it’s all because browser caching instead of loading each and every image and filetypes like css,js and videos we can add all these types in caching to increase website load performance.

In below code we are adding expires time to each and every type we added in the above code,here A31536000 indicates A for Access and numeric code indicate time for expire, and also we can add as below.
ExpiresByType text/css “access 1 month”
In the above code we can change the expire time 1 month by replacing “Month” to “Year”.

Here in the below code we are enabling the gzip compression in apache web server.

Here the below code do all the matching files,unset the header cookie.

Thanks for reading this article

Tags: , ,
I am Saritha Reddy, a Remote codeigniter,Angularjs Developer. I have 4+ years of strong experience in designing, implementing, Programming and delivering advanced XAMPP ( Apache, MySQL and PHP) Web applications development. I am an Indian national and based Andhra Pradesh,Hyderabad. In addition to providing custom programming and design, I also have extensive experience with Open Source technologies to keep costs down and get websites running with as little fuss and wait as possible.


Leave a Comment