msie_padding

Controls how NGINX pads HTTP responses for Internet Explorer.

Syntaxmsie_padding on | off;
Defaultoff
Contexthttp, server, location
Argumentsflag

Description

The msie_padding directive is utilized to manage response padding specifically for Internet Explorer (IE) browsers. When enabled, it adds a padding to the response body to improve compatibility with certain versions of IE which may not render pages correctly when handling chunked responses or when serving specific content types like gzip. This directive ensures that IE clients receive properly formatted responses that conform to the browser's quirks, thus avoiding issues such as broken layouts or incomplete content.

The directive accepts a single flag argument that can either enable or disable the padding. When set to on, NGINX will apply the necessary padding; setting it to off turns this feature off, potentially resulting in less compatibility and display issues in older IE versions. The behavior of this directive is particularly important for sites still serving legacy clients, and careful consideration should be given before toggling its state.

Config Example

http {
    msie_padding on;
    server {
        location / {
            # serve your content here
        }
    }
}

Using msie_padding on with modern browsers may lead to unnecessary overhead as newer browsers do not require this feature.

Be aware of performance implications when enabling padding on high traffic sites, as it may add extra bytes to each response.

← Back to all directives