IE10 renders in IE7 mode. How to force Standards mode? - windows

On microsoft's site they claim that simple doctype declaration is enough. But even a document as short as this falls back to IE7 mode:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
http://d.pr/i/fvzb+

Internet Explorer makes the assumption that most webpages were written to target earlier versions of IE and looks at the doctype, meta tags and HTML to determine the best compatibility mode (sometimes incorrectly). Even with a HTML5 doctype IE will still place your website in compatibility mode if it's an intranet site.
To ensure that your website always uses the latest standards mode you can either make sure Display intranet sites in Compatibly is turned off. However you have to do this on each machine local to the web server (instructions are below).
Alternatively, and better yet, you can use the X-UA-Compatible header to turn this off from the server. It's important to note that using the meta tag will not work!
<!-- Doesn't always work! -->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Throughout MSDN it's mentioned that using a host header or a meta tag should override even intranet sites. The article Understanding compatibility modes in internet explorer 8 says the following.
A large number of internal business web sites are optimized for Internet Explorer 7 so this default exception preserves that compatibility.
...
Again if a Meta tag or http header is used to set a compatibility mode to the document it will override these settings.
However, in practice this will not work, using a host header is the only option that works. The comments section of the article also shows numerous examples of this exact issue.
Using a Meta tag also has several other issues such as ignoring the tag if it's not directly under the <head> tag or if there is too much data before it (4k). It may also trigger the document to be reparsed in some versions of IE which will slow down rendering. You can read more about these issues at the MSDN article Best Practice: Get your HEAD in order.
Adding the X-UA-Compatible header
If you are using .NET and IIS you can add this to the web.config, you could also do this programmatically:
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-UA-Compatible" value="IE=edge" />
</customHeaders>
</httpProtocol>
</system.webServer>
If you're not using IIS it's easy to do in any language. For example, here's how to do it in PHP:
header('X-UA-Compatible: IE=edge');
As long as the X-UA-Compatible header is present with the HTML5 doctype, a site will always run in the latest standards mode.
Turning off Compatibility View
It may still be useful to turn off Compatibility View. To do so untick Display all intranet sites in compatibility view in the Compatibility View Settings.
You can bring this up by hitting Alt to get the menu.
Edit
This answer also pertains to IE9.

This works for me..
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

Try adding the following tag to the head
<meta http-equiv="X-UA-Compatible" content="IE=11,IE=10,IE=9,IE=8" />

The meta tag doesn't do anything for intranet sites and my issue was IE10 rendering in IE10 compatibility mode. What tackled the issue for me was taking #Jeow's answer further and using that value in an http header by adding the following to web.config under IIS:
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<!-- <add name="X-UA-Compatible" value="IE=edge" /> not good enough -->
<add name="X-UA-Compatible" value="IE=11,IE=10,IE=9,IE=8" />
</customHeaders>
</httpProtocol>
</system.webServer>
For IE purposes, intranet sites include public-facing sites that are not routed to externally - for example a Stackoverflow employee working from the office would probably see stackoverflow.com in compatibility mode.

It worked perfectly for me when i did the folowing:
On http://msdn.microsoft.com/en-us/library/gg699338(v=vs.85).aspx
Used the exact example they provide in the first box(added the missing </html> at the bottom), opened it in IE10 and standards was forced, i think you may need actual content in the html for it to force standards not sure though.
My suggestion would be to replace your empty code with actual content(something simple) and see what it does.

Related

IE document mode

<meta http-equiv="X-UA-Compatible" content="IE=8,chrome=1" />
i've put this between my <head></head>
it works in my IE(11),
but my client who uses IE(8),the document mode always use ie7,
and all the other in his company who uses IE8 show the same problem too, not just him.
i saw some people say usingcontent="IE=edge"is a way
but i can't ,i must use content="IE=8"to run other thing...
is there any way to fix it? to make the browser used document mode in ie8?

Pinterest URL Debugger Grabbing Old Info

Running a URL through the Pinterest URL Debugger, and it appears to be caching have old data. Is there a way to force a refresh similar to Facebook's debugger?
I would attempt to clear your browser cache (I'm assuming it's ran in browser).
Maybe it's also using an old cookie, so log out, clear your browser cache/history, then close and open it again. You could also try a different browser to access it.
You could also try changing some old data to see if there is a pinterest db process that's using old data, and an update might refresh it.
Otherwise, you may want to reach out to pinterest support.
OK so it turns out that it was NOT holding on to old information, but rather I was using the incorrect tags for price and currency.
should be og:price:amount and og:price:currency
full documentation for the product type of rich pins: https://developers.pinterest.com/docs/rich-pins/products/
from above, minimum requirements:
<meta property="og:title" content="Name of your product" />
<meta property="og:type" content="product" />
<meta property="og:price:amount" content="1.00" />
<meta property="og:price:currency" content="USD" />

Why won't Joomla render my jdoc tags on the frontpage?

We just migrated a client from their server to a cloud solution. We moved their Joomla 1.5 site with little issue. The databases were migrated with ease. We had to clean up a few stray 'localhost' database connections. All seemed well and good.
Except the front page. Which for some odd reason refuses to render jdoc tags. At all.
The following HTML is currently found when viewing the front page of their Joomla install:
<!DOCTYPE HTML>
<html lang="en-gb" dir="ltr">
<head>
<meta charset="utf-8" />
<jdoc:include type="head" />
<jdoc:include type="modules" name="header-scripts" />
This is the only page that has this issue. All other pages on the site render jdoc tags correctly. My google search of this problem seems to end up with most people having the opposite issue: the front page renders fine and the other pages do not. There seem to be other related issues when dealing with newer versions of Joomla, but I cannot connect the difference in code between them, especially as Joomla 2.5.x uses a completely different approach to building the pages.
Any suggestions on how to fix this?
Notes:
Joomla 1.5
MySQL 5.1
PHP 5.3
Was running on a dedicated server, now running on a cloud server
This is my first foray into Joomla, and I am not impressed.
using YOOThemes as the templating engine (I have read something that this may be the issue, but I have no clue how to fix it.)

what is causing IE8 to render in IE7 mode by default

this site : http://medisra.sideradesign.com
it is rendering in IE7 document mode by default.
Is this due to a CSS or HTML validation error? how can I identify what's causing it?
thanks
Here's all the places I can think of where the header could be coming from.
Considering your comment:
I have other subdomains on the same
server and the sites render in
standards mode.
It's unlikely to be defined in Apache's httpd.conf or similar.
Have you made 100% sure there are no other .htaccess files or other configuration files which could be introducing it?
Is your PHP code outputting the header? It would look like this in PHP:
header('X-UA-Compatible: IE=EmulateIE7');
Could it perhaps be the fault of a Wordpress plugin?
You could use a utility to search in every single file of the website for the string "EmulateIE7".
If you still can't find it after following through those ideas, I'm afraid I can't think of anything else.
This is a good reference about defining document compatibility mode.
This will render all pages on the site in IE7
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=EmulateIE7" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
Check in the source of that page if the head contains the following meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
If it does, that's why it renders the page like IE7 by default.

FireFox and html5 video - grey box with x

So, I'm just trying to put a simple html5 video player on this clients website while I do the rebuild.
Thought it would have been a straight forward thing to do but when I checked it in FF all I see is a dark box with a grey "x" in it.
I am using the latest FireFox 3.6.12.
You can see for yourselves here.
This is the code Im using - I thought it was valid html5 - maybe not?
CODE :
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="reel2.css" type="text/css" media="screen" />
<title>Christopher Stewart - Theatrical and Commercial Reels</title>
</head>
<body>
<div class="main">
<div class="header">
<div class="back">
<img src="http://thechristopherstewart.com/REEL_files/ChrisStewart_Website.jpg" />
<span class="backbtn">——back</span>
</div>
<span class="page_title">Christopher Stewart: Video Reel</span>
<div class="theatrical">
<span class="title">Theatrical Reel</span><br><br>
<video width="640" height="480" preload controls>
<source src="reelvids/120610-reel.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
<source src="reelvids/120610-reel.webm" type='video/webm; codecs="vp8, vorbis"'>
<source src="reelvids/120610-reel.theora.ogv" type='video/ogg; codecs="theora, vorbis"'>
</video>
</div>
</div>
</div>
</body>
</html>
* EDIT 12/6/10 - 3:00pm *
After following a a tip that the video did not seem to be on the server I investigated; the video is on the server but is only accessible if ftp is entered into the browser - otherwise a 404 error is generated. Not sure why this is happening - if anyone out there knows how to fix this please let me know!
Thanks for all the great help!
It seems that out of those three only the .mp4 file exists on the server. Is that on purpose? Firefox probably doesn't support the codec used in the .mp4 file, and tries to fall back to your fallbacks which don't exist.
Edit: I can see that you're using IIS as your HTTP server of choice. I'll avoid going into your choice of software for now, but if the files actually exist on the server, this is likely caused by IIS's policy with unknown file extensions. IIS is made so that it refuses to send any files with unknown extensions to the client. If the extension is unknown, it returns a 404 error. IIS has a subcode of sorts for this, which it may show on its own error pages, but obviously the true HTTP error code is always 404. The code for "file not found" is 404.0, while the code for "unknown file extension" is 404.3 (here's a complete list of error codes).
You need to add those file extensions into your IIS configuration with the correct MIME types.
The problem was fixed by configuring the IIS as Matti Virkkunen suggested. The IIS for GoDaddy's hosting does not include the theora (.ogg, .ogv, .oga) file extensions or the .webm extension by default. This means that if you put a file with any of these extensions onto the server they won't be recognized and thus (in an effort to protect the user) will not be allowed to be viewed/interacted with by the user.
One way to solve this is to create a web.config (aka an xml file with a config extension on it) to force the server to accept certain MIME types. Then upload it onto the root hosting folder. Be careful you do not overwrite an existing web.config as it could cause your site to crash. Also, telling the IIS to allow a file type that it already allows (.mp4 for instance) will also cause unexpected errors. Before creating/editing your web.config file be sure to check in with the IIS's default permissions.
This is what my web.config file looks like to fix the GoDaddy IIS problem :
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".ogg" mimeType="audio/ogg" />
<mimeMap fileExtension=".oga" mimeType="audio/ogg" />
<mimeMap fileExtension=".ogv" mimeType="video/ogg" />
<mimeMap fileExtension=".webm" mimeType="video/webm"/>
</staticContent>
</system.webServer>
</configuration>
As far as I know FF3.6.x does not have HTML5 support. It does support HTML5 video tag, but only for specific codecs.
This is from http://support.mozilla.com/en-US/kb/Youtube%20HTML5%20does%20not%20work%20in%20Firefox
Youtube is currently testing HTML5,
but does not list Firefox as a
supported browser. While Firefox can
display HTML5 video, Youtube uses a
patented codec to encode the videos,
making it unusable by open-source
software like Firefox.
I used your code with my own videos, and if the referenced video files exist and are of the proper format, everything works.

Resources