The fix is simple, just add `<meta http-equiv="X-UA-Compatible"
content="IE=11" />` to the base template. I'll make a PR for this.
It's pretty annoying without this, CSS can break and the pages look
generally poor.
--
Ticket URL: <https://code.djangoproject.com/ticket/31309>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => wontfix
Comment:
[https://docs.microsoft.com/en-us/previous-versions/windows/internet-
explorer/ie-developer/compatibility/jj676915(v=vs.85)?redirectedfrom=MSDN
As per Microsoft's advice] we use the HTML5 document type: `<!DOCTYPE
html>`. Document modes have been deprecated since 2013 and "should not be
used".
If you want this you can create your own `admin/base.html`, as per the
[https://docs.djangoproject.com/en/3.0/howto/overriding-templates/
Overriding templates docs].
Give it the following content to add the meta tag to the existing block:
{{{
{% extends 'admin/base.html' %}
{% block extrahead %}
<meta http-equiv="X-UA-Compatible" content="IE=11" />
{% endblock %}
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31309#comment:1>
* status: closed => new
* resolution: wontfix =>
Comment:
No that does not work, unfortunately, since the X-UA-Compatible tag needs
to come before the stylesheets.
--
Ticket URL: <https://code.djangoproject.com/ticket/31309#comment:2>
* status: new => closed
* resolution: => wontfix
--
Ticket URL: <https://code.djangoproject.com/ticket/31309#comment:3>
* status: closed => new
* resolution: wontfix =>
Comment:
From the documentation:
"The X-UA-Compatible header isn't case sensitive; however, it must appear
in the header of the webpage (the HEAD section) before all other elements
except for the title element and other meta elements."
--
Ticket URL: <https://code.djangoproject.com/ticket/31309#comment:4>
* status: new => closed
* resolution: => needsinfo
Comment:
> ... the X-UA-Compatible tag needs to come before the stylesheets.
There's no block for that. Possibly we could add a block but I go back to
MS's docs saying that the tag shouldn't be used.
Ref #31032 here: it's not clear that IE is still supported (vs Edge).
Maybe an email to the DevelopersMailingList is appropriate to clarify the
situation.
--
Ticket URL: <https://code.djangoproject.com/ticket/31309#comment:5>
Comment (by Carlton Gibson):
You've target IE11 [https://docs.microsoft.com/en-us/previous-
versions/windows/internet-explorer/ie-developer/dev-
guides/bg182625(v=vs.85)?redirectedfrom=MSDN but, the MS Docs again]:
> Starting with IE11, document modes are deprecated and should no longer
be used.
You may need to narrow down **exactly** what CSS elements aren't working.
Maybe those can be addressed but removing features for a previous
generation browser isn't likely to win friends.
Given Claude's comment on #31032
> ...especially since the responsive patch
Have you tried overriding the `responsive` block in `admin/base.html`?
Maybe removing those stylesheets is enough to simplify it?
(TBH using Edge seems the best option here.)
--
Ticket URL: <https://code.djangoproject.com/ticket/31309#comment:6>
Comment (by Carlton Gibson):
Hi Peter.
If you can prepare some more details on the problems we can look at
whether we can (and want) to address them.
Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/31309#comment:7>
* cc: Carsten Fuchs (added)
Comment:
To my understanding, the IE can be set, per policy, to render all intranet
pages in "compatibility mode" (IE7?), which seems to cause problems with
modern CSS.
In my tests,
{{{
<meta http-equiv="X-UA-Compatible" content="IE=edge">
}}}
fixes the problem.
https://stackoverflow.com/questions/6771258/what-does-meta-http-equiv-x
-ua-compatible-content-ie-edge-do has a lot of information about this.
--
Ticket URL: <https://code.djangoproject.com/ticket/31309#comment:8>