what is causing IE8 to render in IE7 mode by default - internet-explorer-8

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.

Related

web.config file not being read by Google PageSpeed Insights

I have read through answers here and still stuck: IIS7 Cache-Control
I have the following web.config.xml file in the root directory of my website:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00"/>
</staticContent>
</system.webServer>
</configuration>
The purpose of this web.config file is to pass the Google PageSpeed Insight 'leverage browser caching' test. I am using Windows Plesk hosting, and therefore cannot use a .htaccess file for this.
No matter how I try and format the contents of the web.config file, Google does not seem to recognise any form of browser caching is occurring. I am not sure if it is just Google, or if it means that the images and other static resources on my page are being cached or not. Is there an easy way to check this?
Can anyone see any issues with my web.config.xml contents that might be causing the issue? Or is there anything else I need to do with it other than stick it in the root directory of my site?
The file name should be web.config and not web.config.xml
*.config is already a xml type of file

Downloading ISO file

When i try to download iso file, it results in 404 page not found. The link in this instance is like:
http://www.domain.com/virtualDir/filename.iso
virtualDir points to a location on our file servers.
I don't want to read the binary array and then push it out as download since it is almost 600mb. I want the browser to handle this just like exes and zips.
What is the best way to handle this?
I would imagine it is because IIS doesn't serve unknown file extensions. You need to add the MIME type to the overall IIS settings, or the web.config. As you asked for in the comment, I'd probably recommend placing it in the web.config since it doesn't require additional configuration from a sysadmin and everything is in one place.
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".iso" mimeType="application/octet-stream" />
</staticContent>
</system.webServer>
</configuration>

Response header: Pragma: No-cache

So I've been fiddling around with this for quite a bit now and don't seem to be anywhere near the answer to my problem.
For some reason IE does not cache the static content of my website (img/js) yet Chrome does.
Looking at the headers I found the both the pragma tag, as well as the Cache-control have a no-cache set but I do not know where this thing comes from. No-where in the application the no-cache is ever set.
I am using IIS 7.5 and Oracle WebGate as authenticator.
On our IIS itself, I have set the settings to cache the content and live for 36 hours.
Also in the web.config the following tag is present in the image folder:
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
</staticContent>
</system.webServer>
Furthermore, I also have a tag in my web.config of my front-end
<caching>
<cache disableExpiration="false" />
</caching>
I read on some forums that removing this would help but alas, it doesn't.
I also looked for add extension because that also seemed to be causing issues according to someone else but I never set something like that.
Has anybody got any idea what this could be causing?
By default Oracle Web Gate uses by default cache control no-cache and pragma no-cache.
see the doc here : http://docs.oracle.com/cd/E22203_01/doc.31/e20664/chapter_12.htm
at the bottom of the page

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

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.

server error:405 - HTTP verb used to access this page is not allowed

I have a php Facebook application which I have uploaded in a Microsoft server. When I run the application i get this error. Does anybody know the cause of this ?
405 - HTTP verb used to access this page is not allowed. The page you
are looking for cannot be displayed because an invalid method (HTTP
verb) was used to attempt access.
Even if you are using IIS or apache, in my guess you are using static html page as a landing page, and by default the web server doesn't allow POST or GET verb on .html page, facebook calls your page via POST/GET verb
the solution would be to rename the page into .php or .aspx
and you should be good to go :)
In the Facebook app control panel make sure you have a forward slash on the end of any specified URL if you are only specifying a folder name
i.e.
Page Tab URL: http://mypagetabserver.com/custom_tab/
you can add these lines to the web.config:
<system.webServer>
<modules>
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="WebDAV" />
</handlers>
</system.webServer>
It means litraly that, your trying to use the wrong http verb when accessing some http content. A lot of content on webservices you need to use a POST to consume. I suspect your trying to access the facebook API using the wrong http verb.
I fixed mine by adding these lines on my IIS webconfig.
<httpErrors>
<remove statusCode="405" subStatusCode="-1" />
<error statusCode="405" prefixLanguageFilePath="" path="/my-page.htm" responseMode="ExecuteURL" />
</httpErrors>
I've been pulling my hair out over this one for a couple of hours also. fakeartist appears correct though - I changed the file extension from .htm to .php and I can now see my page in Facebook! It also works if you change the extension to .aspx - perhaps it just needs to be a server side extension (I've not tried with .jsp).
Try renaming the default file. In my case, a recent move to IIS7.5 gave the 405 error. I changed index.aspx to default.aspx and it worked immediately for me.
In my case, IIS was fine but.. uh.. all the files in the folder except web.config had been deleted (a manual deployment half-done on a test site).
I got this error when I was using jquery and lib was not present in the given path, once jquery lib is added back error was gone.
[File name - calculate.html]
I had this err on the host too (my project was .net core2.1 webapi )
please add this code in web config in host :
<modules>
<remove name="WebDAVModule" />
</modules>

Resources