Browser Caching for WordPress on Microsoft Azure

0 Flares Twitter 0 Facebook 0 StumbleUpon 0 Google+ 0 LinkedIn 0 0 Flares ×

A common problem I’ve found when hosting WordPress on Microsoft Azure is that you’re quite often missing the browser cache settings. Even if you’re using a plug-in like W3 Total Cache and set the browser caching settings on, you’ll find that it doesn’t work.

The reason is that most wordpress plugins pretty much assume you’re running on something like Apache, and apply settings to manage things as such (normally around htconfig). Azure is running your wordpress installation under IIS, which has its own way of handling browser caching.

To add browser caching to wordpress on azure (IIS) just add the following setting to a web.config file located in the wwwroot directory of your site. (This will require you to ftp on to your azure website).

Do note however, that this will not work if you’re using a CDN.

This adds browser caching for 1 year (cacheControlMaxAge)

The Essential App Marketing Kit
Subscribe To My Newsletter To Get an Entire Chapter From The Book for FREE
Never display this again
0 Flares Twitter 0 Facebook 0 StumbleUpon 0 Google+ 0 LinkedIn 0 0 Flares ×