Middleware — django-gcframe v0.9.0 documentation

### Navigation

- index
- modules |
- next |
- previous |
- django-gcframe v0.9.0 documentation »

# Middleware

## Overview

The `GoogleChromeFrameIEMiddleware` middleware adds an `X-UA-Compatible` HTTP header to the response of all views. When using default settings (which you should), this header activates GCF in all versions of Microsoft Internet Explorer that have it installed. Those that do not have GCF installed will instead use the highest compatibility mode available to them.

Views can be exempt from the header addition by using the `gcframe_exempt` decorator.

## Installation

Install the middleware by adding it your `MIDDLEWARE_CLASSES` setting:

    MIDDLEWARE_CLASSES = (
        …
        'gcframe.middleware.GoogleChromeFrameIEMiddleware',
        …
    )

Put it somewhere in the middle-ish of the list. An exact ordering position is not necessary (to my knowledge), but putting in the middle will at least ensure that it’s not outside of other middleware that require being near the start or end.

For more information on middleware ordering, see the Django documentation’s middleware reference and middleware topic.

### Navigation

- index
- modules |
- next |
- previous |
- django-gcframe v0.9.0 documentation »