Call Us: +90 850 532 5 260 Submit Ticket   Login
Take Advantage of Browser Caching

Take Advantage of Browser Caching

When visitors visit a website, they need to download files such as Javascript, HTML, and CSS on the website. Since each download request will put a load on the server, it will take a long time to open large, content-filled sites when your internet speed is slow.

Since every visitor to the website will repeat this situation, the server will be loaded more than once each time. In this case, it causes the problem of your pages opening more slowly to the visitors.

But you can solve this situation easily. Browser caching Thanks to this process, users will expect normal loading times when they first open your website, but on each subsequent visit, visitors will now be able to open your website faster because the necessary files have already been downloaded.

The steps you need to follow for this situation are given below step by step.

  1. Editing .htaccess File

If you have access to your .htaccess file, you need to add the code given below to your .htaccess file. In this way, your caching process will work successfully.

## EXPIRES CACHING ## ExpiresActive On ExpiresByType image/jpg "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType application/pdf "access plus 1 month" ExpiresByType text/x-javascript "access plus 1 month" ExpiresByType application/x-shockwave-flash "access plus 1 month" ExpiresByType image/x-icon "access plus 1 year" ExpiresDefault "access plus 7 days" ## EXPIRES CACHING ##
  1. Testing Phase

After adding the necessary code to your .htaccess file, your website browser caching You can test whether the operation has been performed or not.

For this, you can use online tools such as GTMetrix and WebPageTest. These tools will provide you with extensive information about your website and will also inform you about the status of your website for caching.

You can check here to perform a Pagespeed Test.

https://developers.google.com/speed/pagespeed/insights/?hl=tr

About the Author

Leave a Reply

en_US