-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improves cross-browser compatibility #275
Conversation
Adds meta tags recommended by Bootstrap 3.3 basic template for cross-browser compatibility
Would it be better to use those recommended for Bootstrap v4.1? https://getbootstrap.com/docs/4.1/getting-started/introduction/#starter-template |
I think the Bootstrap 4 template doesn't support older browsers, and assumes HTML5 compatibility. I was hoping that Dash would support old browsers like IE11. |
Here's a reference on this tag: https://stackoverflow.com/a/6771584/4142536 I still need to take some time to thoroughly think this one through (e.g. make sure it's the right move for Dash in the future, make sure that it won't break anything) |
IE11 does support HTML5. Bootstrap 4 support IE10+... https://getbootstrap.com/docs/4.1/getting-started/browsers-devices/#supported-browsers |
Ah good catch @pope1ni. I guess the real reason that I need the |
A quick search shows that using meta tags may not solve this problem for you: https://stackoverflow.com/a/9338959 |
It does work in my case. I overrode |
Would it be possible to adjust this patch to allow arbitrary of either
|
See the proposal in #265 |
@@ -300,6 +300,8 @@ def index(self, *args, **kwargs): # pylint: disable=unused-argument | |||
<html> | |||
<head> | |||
<meta charset="UTF-8"> | |||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My dash app doesn't work with IE. Only after I added these two lines, it work with all browsers. It will be nice to include this in the Dash by default.
This popular project also includes it by default: https://github.com/h5bp/html5-boilerplate/blob/master/dist/index.html#L6. Seems like we should give it a go. I'm still interested in answers to those questions above but given that adding this tag makes Dash apps work for some users in IE, seems like something worth putting in. Any other thoughts @plotly/dash ? In order to add this, this PR's conflicts will need to be resolved |
So see #275 (comment) and my response #275 (comment) above for the reasoning. Dash works fine in IE11, but apparently in certain configurations, e.g. when hosted on an intranet, IE11 will default to one of it's compatibility modes which causes it to behave like an older version of IE. I don't know what compatibility version was used for @amarvin's intranet, but it sounds like Dash doesn't work with it (and indeed Dash should not make any efforts to support IE<11 as Microsoft no longer support it). Setting the
The
The The
This, I imagine, was the problem, but only because of IE11 being in compatibility mode and behaving as an older version of IE. You could actually simulate the problem by adding something like I hope that this clears things up for you @chriddyp. |
Alright, I think I'm convinced. @T4rk1n - could you wire this in? It looks like this tag needs to be the first meta tag (see https://stackoverflow.com/a/9624500/4142536). And we should allow users to override this tag with meta_tags, in a similar way to how we allow users to override the default encoding. Many thanks everyone for the feedback and discussion ❤️ |
Alright I'll add this. |
Implemented in #316 |
Adds meta tags recommended by Bootstrap 3.3 basic template for cross-browser compatibility. Relates to #170