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 Internet Explorer that have it installed. Those that do not have GCF installed will instead be directed to use the highest compatibility mode available to them.

Tip

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.

Tip

The content of the X-UA-Compatible header can be altered using by overriding settings in gcframe.settings.