• Companion Auto Update
  • Companion Sitemap Generator
  • Companion Revision Manager
  • Companion Portfolio

Papin Schipper (CodeerMeneer)

Coffee addict & WordPress developer

  • Hello
  • Plugins
  • Blog
  • Documentation
  • Contact me
  • Menu

What is browser caching? And how do you do it?

  1. 1 Home
  2. 2 Blog
  3. 3 What is browser caching? And how do you do it?
What-is-browser-caching-And-how-do-you-do-it

With each update from searchengines like Google and Bing the speed of your website becomes more and more important and recently even Facebook started changing their algorithm so that faster sites will be shown more often than slower site.

Now I think most developers will use tools.pingdom.com to check the speed of a site and what can be improved. And one thing you can score on is “Leverage browser chaching”

But what IS browser caching?

  • Browser caching stores webpage resource files on a local computer when a user visits a webpage.
  • “Leveraging” browser caching is when a webmaster has instructed browsers how their resources should be dealt with.

When a web browser displays your webpage it has to load several things like images, stylesheets and javascript files.

What browser caching does is “remember” the resources that the browser has already loaded. When a visitor goes to another page on your website your logo, stylesheets, etc. do not need to be loaded again, because the browser has them saved / rememberd.

How to use browser caching via .htaccess?

If you want to use browser caching via your .htaccess file you can simply add the following code. It’s recommended to add this to the top of your htaccess file.

## 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 text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##
Papin Schipper 15 November 2017

Continue reading

Auto Update WordPress

It’s time for another update to Companion Auto Update. And it’s a big one

We figured it was that time again, that time where Companion Auto Update for WordPress gets another update. And this time it’s a big one. Version 3.0 of our plugin brings two new features that many of you have requested over the past months. We know it took us long enough, but better to do […]

Papin Schipper 15 November 2017
Companion Revision Manager

First update for Companion Revision Manager

It’s been a few days since the initial release of Companion Revision Manager but it’s already update time. Today (8/12/2017) update 1.1 was released to the WordPress plugin directory. What’s new? This update isn’t one that comes with a big changelog as I’m really trying to push stable updates on this one and test everything […]

Papin Schipper 15 November 2017

Companion WordPress Plugins

Helping you get the most out of your WordPress website, that’s what the Companion Plugins for WordPress are all about.

Check out my portfolio for all the plugins.

I’m always looking for new ideas as to what I can create next, or what can be improved to one of my existing plugins so don’t hesitate to contact me about any idea!

Recent posts

  • WordPress 5.5 versus Companion Auto Update
  • Companion Auto Updates’ most requested feature is here (sort of)
  • Add more intervals to the options in Companion Auto Update
  • How to use the shortcode in Companion Portfolio
  • Companion Sitemap Generator <3 Gutenberg

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Papin Schipper (CodeerMeneer)Coffee addict & WordPress developer
  • HTML Sitemap
  • Curriculum Vitae
  • Plugins for WordPress
  • Hire me?