• About Us
  • Blog
  • Basket
  • Account
  • Sign In


Published on Wednesday, July 17, 2013

Using the Vary Header with Compression in IIS

Eraz Benari and his team at Microsoft have now released an official fix for this problem. You can download the patch here. If you have already installed our previous fix, it is advised to uninstall it completely and revert to the official solution.

Download Official Patch

Two common and easy ways to increase website performance is to use caching and compression to ensure a minimal amount of bandwidth is consumed.

Google's guidelines on caching is to use the Vary http header to specify which conditions the page may change. For instance, if the Vary header was 'User-Agent' then the Google indexer and your ISP will know that the webpage may change depending on device useragent, useful for mobile optimised pages.

This header is easy to set in any .NET based web site using the code Response.Cache.Headers.UserAgent = true. However when Dynamic Compression is enabled in IIS 7 or 8 the Vary header is removed after .NET managed code has completed execution. This prevents IIS based web sites from using Dynamic Compression and respecting Google's requirements. Dynamic Compression should be enabled for best practice performance reasons, particularly when dealing with mobile phones typically using low bandwidth connections.

A further complication is that any downstream public caching will also fail if Dynamic Compression is enabled. The problem was first reported last year, and is only now being recognised as a major issue for IIS based web sites as Google are now becoming more strict and mobile SEO more relevant to web site owners. The following page contains details of Google’s recommendations.

Fortunately, with the help of Erez Benari at Microsoft, 51Degrees.mobi has made two IIS modules that combine the Vary headers of the website before and after compression. For installation and download instructions, see our IIS Modification Page.

Read More

Comments (0)

Author: Anonym

Categories: Development

Tags: IIS



.NET 2013 2014 4G 51Degrees 5G A.C.Roma A7 ABI Acer Adtech Affiliate Marketing Afilias Alcatel Amazon AMP Analysis Analytics Android Android 5.0 Lollipop Android Kitkat Android Lollipop Android Media Stick Apache API Apple Apple TV Archos Asha Asian Market ASP.NET Asus Australia Big Data Black Friday Blackberry Blink Browser C C# Case Study CeBIT CES Chrome Cloud CMS combinations Comparison Competition CoolPad COTW Cron CSS3 Data Data Blog Data File Data Model Daydream Denver Design Desire Eye Desktop Detection Developers Device Device Data Device Detection Device Intelligence Device Popularity Device property Device Types Device Use DeviceAtlas Display dmexco DoCoMo Doogee DotNetNuke Download Drupal Email EReader E-Reader Ericsson Evaluation Event Examples EXPLAY Rio Facebook feature Firefox Firefox OS Fly Foundation Framework France Galaxy S3 Galaxy S5 Galaxy Tab A Galaxy Tab A 8.0 Galaxy Tab A 9.7 Germany git repositories Global Google Google Daydream GSMA HAProxy Hardware Hisense HTC HTC ONE MAX HTC OS HTML5 HTTP HTTP Headers Huawei HUAWEI. UPDATE HUDL Huwaei IBC Icemobile Prime 4.0 IE IFA IIS Image Optimiser Image Optimizer India Infographic Ingeniux Internet usage iOS iOS 7 iOS 8 ipad iPhone iPhone 6 IsEmailBrowser IsWebApp Italy Japan Java Javascript Jolla Kentico Keynote Kindle Kindle Fire Kindle Fire HD Leagoo Lenovo LG Location Log File Analysis LTE Lumia m.dot macOS Map Memory Meta Data Mi 4S Micromax Microsoft Miia Style Mobile Mobile Analysis Mobile Analytics Mobile Devices Mobile Marketing Mixer Module Motorola MVC4 MWC MWC 2017 MWC16 MyPhone Native Native Apps NET New Release News News Letter Nexus Nexus 6 Nexus 9 NFC NGINX Nokia Nokia 3310 Non-Mobile NVIDIA Omate On7 OnePlus 5 Opera Opera Mini Operating System Optimisation OS OSX 10.10 OTA Panasonic Patent PC Pebble Performance phablet phone PHP Poland Presentation Press Release Price Band PRIV programmatic PS4 Publishers Python QMobile QR Codes Redirection Research Reseller Responsive Images Responsive web design RESS Review reviews RIM Ringmark RTB RWD Safari Samsung Scala ScientiaMobile Screen Screen resolution Screen Size SEO Server Server-side optimisation Set Box Set Top Box Sharepoint Shark 1 SHIFT phones Sitecore Sitecore version 9 SLUSH Smart TV Smartphone Smartphones Smartwatches Snapdragon Sony Sony Xperia Spain Swedish Beers Symbian Tablet Tablets Tesco Testing Tips Top 5 TOTW Tutorial TV UDS UK Umbraco Update updates US User Agent UserAgent User-Agent Vendors Version 3 Video VoLTE VR Wearable Web Web Apps Web content management WebKit WebMatrix White Paper Widgets Widnows WiFi Wiko Wileyfox Windows Windows Phone WURFL Xbox XBox One Xiaomi Xperia Xperia z Yosemite Z10 ZenFon 2 ZOPO ZTE