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

Blog

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:

Name:
Email:
Subject:
Message:
x

Tags

.NET 4G 51Degrees 5G Acer Adform Adtech Advertising Afilias Alcatel Amazon AMP Analysis Analytics Android Apache API Apple Asian Market ASP.NET Asus Blackberry Browser C C# Centro Chrome Cloud CMS CPU CSS3 Data Data Blog Data File Daydream Design Detection Developers Device Device Data Device Detection Device Intelligence Device Models Device property DeviceAtlas Disney dmexco DotNetNuke Download ebay Ericsson Event Facebook Firefox Foundation Framework Galaxy git repositories Google Google Analytics Google Daydream GPU GSMA Guess HAProxy Hash Trie HTC HTML5 HTTP HTTP Headers Huawei Infinix Ingeniux Internet usage iOS iOS 13 ipad iPadOS iPhone iPhone 11 Java Javascript Kentico LG Liferay LTE m.dot Memory Memory leak Meta Data Microsoft Mobile Mobile Analysis Mobile Analytics Mobile Devices Mobile Marketing Mixer Motorola Mozilla MWC MWC 2017 MWC16 Native Apps NET New Release News Nexus NFC NGINX Nokia OnePlus 5 Opera Operating System Oppo Optimisation OS Patent Performance PHP Press Release Price Band programmatic Publishers Python Redirection Research Responsive Images Responsive web design RESS Review RTB RWD Safari Samsung Scala ScientiaMobile SEO Server Server-side optimisation Seznam.cz Sitecore Smart TV Smartphone Smartwatches Sony Swedish Beers Tablet Tencent Testing Tips Tutorial Umbraco Update User Agent User-Agent Valgrind Varnish Varnish Cache Video Vodafone VoLTE Web Web Apps Web content management Webtrekk White Paper Widgets WiFi Windows WURFL Xiaomi Xperia ZTE