Created
February 19, 2013 20:23
-
-
Save vstoykov/4989570 to your computer and use it in GitHub Desktop.
Django Middleware which add a X-UA-Compatible header to the response. This header tells to Internet Explorer to render page with latest possible version or to use chrome frame if it is installed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class XUACompatibleMiddleware(object): | |
""" | |
Add a X-UA-Compatible header to the response | |
This header tells to Internet Explorer to render page with latest | |
possible version or to use chrome frame if it is installed. | |
""" | |
def process_response(self, request, response): | |
response['X-UA-Compatible'] = 'IE=edge,chrome=1' | |
return response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment