I have this HTML, valid for w3c:
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>COMUNE DI MILANO</title>
</head>
<body>
<h1>Ciao Mamma</h1>
</body>
</html>
I don't know why IE Switch to compatibility mode.
I found a meta tag that force the compatibility mode, but I want to know how to build a working HTML page..
Someone knows what will cause the switch? It could depends on Apache version / configuration?
Thank's a lot, Davide.
Try check the headers that are sent along with it, see if there's a X-UA-Compatible header that's set to something undesirable.
Related
When using the HTML <base> tag together with the <style> tag with Microsofts Edge Browser I experience a very strange issue. Here is a very simple reproducer:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Edge dev tools base tag 403 reproducer</title>
<base href="http://netdata.ch/dt/pp/"/>
<style type="text/css">
</style>
</head>
<body>
Hello!
</body>
</html>
http://netdata.ch/dt/pp/reproducer.html
This page produces the following errors in the console/networking tabs when using the developer tools:
A direct invocation of http://netdata.ch/dt/pp/ DOES return a 403. But why does Edge call this URL when using the developer tools? All other browser don't. There is no 403 in the server access logs if developer tools are not involved. So this is ok.
However, if I remove the <style> tag the errors are gone:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Edge dev tools base tag 403 reproducer</title>
<base href="http://netdata.ch/dt/pp/"/>
</head>
<body>
Hello!
</body>
</html>
http://netdata.ch/dt/pp/ok.html
I could see this behaviour with:
Microsoft Edge 20.10240.16384.0
Microsoft Edge 38.14393.0.0
Any idea why this happens when the Edge developer tools are involved?
I would guess that Edge attempts to resolve images etc within the inline style tag from the base defined URL. as such it would need to resolve it for developer tools?
I'm attempting to embed a "new" style page inside of an older page via iframe, but in IE9, things like border-radius are still having no effect when the page is loaded inside the iframe. When the page is loaded on its own, the rounded corners and effects appear just fine, but when inside the iframe, the css properties seem to be ignored.
Initially I thought this was DOCTYPE inheritance issues, but they're both <!DOCTYPE html> (outer and inner page). Next, I belive it's the content="IE=Emulate8" that's being inherited by the inner iframe. This is, of course, a theory. If it's an incorrect theory, please let me know. :)
Anyway, here's an example of the page:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="IE=EmulateIE8" http-equiv="X-UA-Compatible">
</head>
<body>
... stuff...
<iframe>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
</head>
</html>
</iframe>
</body>
</html>
Some of this may not really be relevant. Anyway, my question is: if the EmulateIE8 is the culprit as to why css properties like border-radius aren't working in the iframe under IE9, is it possible to override it or disable it inside the inner iframe?
Just to note: changing what's outside the iframe is difficult without changing the entire framework of the application, unfortunately (legacy apps *sigh*). I'm attempting to put something a little more modern inside of the legacy application.
As noted here:
As of IE9 mode, webpages cannot display multiple document modes. For example, consider a standards-based webpage that contains a frame element that displays content in quirks mode. IE9 mode displays the child frame in standards mode (because the parent document is in standards mode). Starting with Internet Explorer 10, however, child frames can emulate quirks mode. For more info, see IEBlog: HTML5 Quirks mode in IE10. For best results, however, use document modes consistently.
<meta http-equiv="X-UA-Compatible" content="IE=9" >
the above line of code forces the browser to make
Document mode to IE 9 standard and
Browser mode to IE 9 Compatiblity mode
How can i make Document mode to IE 9 standard and browser mode to IE 9 mode
this works for me..
<!DOCTYPE html>
<html>
<head>
<title>title</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
Do you have any other links or scripts above your X-UA-Compatible meta tag in your <head>? If so this might be causing the problem.
Also make sure to check the compatibility settings in your browser itself by going to:
Tools --> Compatability View Settings
There are several possible explanations, such as HTTP headers overriding the meta tag, domain name being blacklisted by Microsoft, or your local admin having forced IE to Compatibility mode. For a description of some possibilities and possible cures, check out IE8 and IE9 Complications in “Activating Browser Modes with Doctype”.
Ridiculous simple HTML-file:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="refresh" content="5; URL=./test.html">
</head>
<body>
<h1>Hello World</h1>
</body>
</html>
When I open the file with any browser, the browsers behave well and reload the page every 5 seconds.
But when I refresh the page manually between two refreshes (F5), the IE (V 8.0.6001.18702) doesn't evaluate the meta tag anymore and the page gets no longer refreshed. Opera, FF and Safari still work as expected and refresh every 5 seconds.
Has anybody else experienced such a problem? How (apart of using Javascript, of course) could this issue be solved?
Edit 1:
Verified this behavior also on IE6, so I guess it's a general IE problem. Any hints how to overcome this?
Edit 2:
To keep that topic going:
is that a known problem or would it
be worth to file a bug ticket
somewhere (where?)?
Could someone
verify that behavior with IE7 and/or
IE9?
In IE 9 it works fine.
P.S. you missed a few quotation marks should be:
<meta http-equiv="refresh" content="5;" URL="./test.html">
As far as i know theres only the mta or javascript way.
Another option might be to use
header("Location: url");
if you can use php, its not really a refresh in it common way, but you could use to redirect to the same page again
As with the meta way, did you tried to put a full url? ( IE, arrg )
Generally speaking, use of the non-standard META-REFRESH is frowned upon by the standards bodies. Having said that, did you try with a fully qualified URL instead of the relative URL? If you're trying to reload the same page over and over again, did you try omitting the URL entirely?
Use this, I suspect your URL is not setup correctly
<html>
<head>
<meta http-equiv="refresh" content="1">
</head>
<body>
</body>
</html>
This always refresh itself.
Hope helps
:)
Javascript is going to be your friend for this one... it ends up working a lot better across browsers for the most part. Besides, meta-refresh is going out of style.
The following script and body onload attribute will continuously refresh the page every 5 seconds.
<html>
<head>
<script>
function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
}
</script>
<noscript>
<meta http-equiv="refresh" content="5" />
</noscript>
</head>
<body onload="javascript:timedRefresh(5000)">
<!-- Content -->
</body>
</html>
A web application we have for an organisation that is officially upgrading its standard browser from IE6 to IE8 (queue celebrations), we've set all our DOCTYPEs to be <!DOCTYPE html> (as well as fixed other html code) and I thought that in IE8 this would cause the page to be rendered in IE8 Standards Mode. However, it is still shown in IE7 Standards mode.
I've added the <meta http-equiv="X-UA-Compatible" content="IE=8"> into the <head> section and it still fails to default to IE8 Standards mode. I'm presuming at this stage that there must be a setting (perhaps Group Policy etc) that is forcing the mode.
After reading a hack on an MSDN forum that if you put the meta tag before the <html> tag, it correctly displays as IE8 Standards mode, and this worked for me. Is there another way to do this? It just looks terrible seeing the meta tag there...
Here's roughly how each page is made up:
<!DOCTYPE html>
<meta http-equiv="X-UA-Compatible" content="IE=8">
<html lang="en">
<head>
<meta charset="utf-8">
<title>Page Title</title>
</head>
<body>
</body>
</html>
You could set X-UA-Compatible as a HTTP response header, instead of as a meta tag.
This is a much cleaner solution than placing it above the <html> tag.
A confusing useful blog post concerning X-UA-Compatible and its many intricacies:
http://farukat.es/journal/2009/05/245-ie8-and-the-x-ua-compatible-situation
Two possibilities:
The meta tag definitely belongs into the <head> section of the document.
If this is in an Intranet, this may be IE's "Smart default" kicking in. Yes, there is such a thing as smart defaults. See here. Because if you're in an Intranet, IE8 will automatically go into IE7 compatibility mode so as not to break the many corporate apps that rely on IE7. Makes sense, right? Right?