Browser Caching and Compression in Azure WebApp

Hummingbird has suggested that I configure browser caching and Gzip compression. As I am running an azure web app (IIS Based), I was directed to some TechNet articles. However after following the guides here, and a few dead-end google search results, I am a loss as to how I should proceed.

Has anyone encountered this before? Do you have any advice on how I can do this?

  • Nithin

    Hi mike,

    Hope you are doing good today. :slight_smile:

    As I am running an azure web app (IIS Based), I was directed to some TechNet articles.

    Hummingbird should work fine in IIS, and IIS 7 server types, however I'm not sure whether Azure makes use of a different configuration when compared to the basic settings of IIS. Was the article you mentioned from TechNet recommend by our staffs? I don't see any related to thread regarding this.

    To have a better idea about this issue, could you please enable support access, so that we could give a closer look. You can grant access from WPMU DEV > Support > Support Access > Grant Access, or check this manual: http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Please let us know once you enable access, so that we could get this sorted. Have a nice weekend. :slight_smile:

    Kind Regards,
    Nithin

  • mike

    Hi Kasia,

    As this is an Azure WebApp there is no control over the underlying OS, and by extension IIS that is running. However, by entering the SCM and checking with the 'ver' command I can see that this is version 6.2.9200, this is Server 2012 which ships with IIS 8.0

    I have followed the guid you suggested and set this to 8 days, however Hummingbird still shows that the cache is disabled.

    Do you, also, have any advice RE Gzip?

    Thanks,
    Mike

  • Nithin

    Hi mike,

    Hope you are doing good today. :slight_smile:

    I got an update from the developer, at the moment the Hummingbird plugin isn't fully compatible, I'm afraid you may notice such similar anomalies in an Azure WebApp environment. I'm marking this thread asking for developers attention, so that this could be fixed in the future release of the plugin.

    Will keep you posted once we have an update regarding the status of this issue. Have a nice weekend. :slight_smile:

    Kind Regards,
    Nithin

  • Rupok

    Hi Mike,

    So would the recommended course of action be to uninstall hummingbird?

    I'm so sorry for the inconvenience you are having and really sorry to hear your frustration, but let me help you understand the situation.

    When you need to run PHP application on Apache or nginx servers, it's really very easy to configure PHP on Apache or nginx. Those servers by default support lots of basic PHP extensions and are super compatible with PHP. On the other hand, Microsoft IIS servers work best with .Net . Obviously you can run PHP in IIS servers, but scope is limited and not broad open like running .Net applications in an IIS server.

    Now, in this scenario, majority of the people who run WordPress, have their sites on either Apache or nginx because WordPress is written over PHP. Now plugins like Hummingbird need advanced configuration which is way beyond just parsing PHP files. Browser caching, Minification etc. are advanced techniques and can't be handled with just PHP without support from server configuration. So sometimes, they don't work so well in IIS servers as they do in any basic Apache or nginx server.

    I can guarantee you that most of your issues you are facing now with these plugins, will be gone if you move your site from an IIS server to an Apache or nginx server. Most WordPress plugins should work fine on IIS because they just render the rules written in PHP. But plugins which need to work with server configuration, might have some problems in IIS servers. This is not about our plugins, this is just a generic situation.

    However, I believe there is enough reason for you to host your WordPress site in IIS. So let's try to fix that. I got this from GTMetrix site:

    When your site is hosted on a Windows server you can enable compression for both static and dynamic files. It’s fairly easy to set this up in the IIS manager:
    1. Open up IIS Manager
    2. Click on the site you want to enable compression for
    3. Click on Compression (under IIS)
    4. Now Enable static compression and you are done!
    When you can't get it working visit Microsoft’s guide on this subject to learn how you can set it up.

    Can you also check these tutorials regarding enabling GZip compression in an IIS server?
    https://technet.microsoft.com/en-us/library/cc771003(v=ws.10).aspx
    https://www.iis.net/configreference/system.webserver/httpcompression
    http://stackoverflow.com/a/25580169/2808424
    http://ericsowell.com/blog/2013/6/7/enabling-gzip-in-iis-on-windows-8
    I believe, these will help.

    Also, can you please talk to your host regarding how you can enable GZip compression for your server? Please let us know what they say. I believe, they will be able to sort this for you.

    Please let us know how these go.

    Have a nice day. Cheers!
    Rupok

  • mike

    Hi Rupok,

    Thanks for the very comprehensive response!! I am not 100% dead set on IIS, it was simply picked as that is where my primary skill set is. Ive NEVER dealt with an apache or nginx server. Im a .net developer who has been asked to develop a Wordpress site for a family member.

    I take it that you would suggest a switch to an apache host? If this is the primary recommendation I will be sure to look into the possibility of that. But I would imagine there would be a fairly substantial amount of work to migrate the data and, given the issues I am encountering, would likely be easier to start from scratch on a new host. Do you have any info on this process?

    In the meantime I will be sure to check out all of the info you provided.

  • Rupok

    Hi mike,

    As I don't have an IIS server, I can't make sure if it will work perfectly, but the easiest solution for migrating your site to any server will be using this plugin: https://wordpress.org/plugins/duplicator/

    This plugin will clone your site and will provide you options to download the site and database dump to be uploaded in your new server. As this plugin will zip all files, and zipping needs server support, there is a little chance of this plugin not working.

    In that case, the best way will be logging in your server with any FTP application and then download all files to your computer. Then take a complete database backup of the database for this site.

    Then upload all files to your new apache server root directory for your domain. And import your database backup file in your new server MySQL database. After that, you should open the "wp-config.php" file from the root directory for your domain in your new server and update database name, database username and database password, then save the file.

    This should be enough for migrating your site to your new server.

    Please let us know if you have any confusion or any further query. We will be glad to help.

    Have a nice day. Cheers!
    Rupok

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.