IE8 forcing document mode as IE7 standards - internet-explorer-8

For my webapplication I am using IE8 as a standard browser.Sometimes the browser is setting Document mode as IE-7 Standards.
I have already tried Servlet Headers as IE=8,IE=edge and all other settings,also my DOCTYPE is also proper.
Does anyone knows why IE is forcing such behaviour ?

You can force IE to use compatibility mode with X-UA-Compatible Meta Tag:
IE 7:
<meta http-equiv="X-UA-Compatible" value="IE=7">
IE 8:
<meta http-equiv="X-UA-Compatible" value="IE=8">
IE 9:
<meta http-equiv="X-UA-Compatible" value="IE=9">
IE look also at the page DOCTYPE:
Standards View
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>This page is NOT Rendered in Compatibility View</title>
</head>
<body>
<h1>This page is NOT Compatibility View</h1>
</body>
</html>
Compatibility View
<html>
<head>
<title>This page is NOT Rendered in Compatibility View</title>
</head>
<body>
<h1>This page is NOT Compatibility View</h1>
</body>
</html>
Standards View
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>This page is NOT Rendered in Compatibility View</title>
</head>
<body>
<h1>This page is NOT Compatibility View</h1>
</body>
</html>
Compatibility View
<?xml version="1.0" encoding="UTF-8">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>This page is NOT Rendered in Compatibility View</title>
</head>
<body>
<h1>This page is NOT Compatibility View</h1>
</body>
</html>
Note, that last example should load as standards view in XHTML mode. But Internet Explorer interprets that XML declaration as requiring compatibility view.

I resolved similar issue like this:
<meta http-equiv="X-UA-Compatible" content="IE=8,IE=9,IE=10,chrome=1" />
Take into account IE version should start from the lowest version.

Related

Sublime Doctype HTML Snippet

Is there a way that this here below ↓↓↓ can be inserted as a snippet?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
</head>
<body>
</body>
</html>
I tried using Preferences -> Key Bindings - User but quotation marks really matters.
You can create a new snippet via Tools -> New Snippet...
You can read more about creating and using snippets here.
FYI, the HTML5 doctype is probably more appropriate and much easier to remember, simply:
<!DOCTYPE html>
Just to spell it out, so you don't need to follow links:
After selecting Tools -> New Snippet..., modify its content to the following:
<snippet>
<content><![CDATA[
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>$0</title>
</head>
<body>
</body>
</html>
]]></content>
<tabTrigger>newpage</tabTrigger>
<scope>text.html</scope>
</snippet>
The $0 between the <title> tags indicates that your cursor will end up here after triggering the snippet. If you'd like to have multiple insertion points that you can Tab between them, use $1 as the first, $2 as the second, etc., using $0 as the final spot.
Save the snippet in your Packages/User directory (it should be the default when you hit save) as newpage.sublime-snippet. To test it, open a new file, set the syntax to HTML, type newpage, and hit Tab, and you should be all set.

understanding the hotlinking of images

i have one image which works fine if reloaded in browser or if you enter in browser and click enter it will load else it will show nothing i have checked locally as well and it is not working if kept in img tag but if that image is opened seperately inh browser and then page is opened it is showing..
this is the image url
http://iv1.lisimg.com/image/1440189/600full-chae--young-han.jpg
almost all img urls of listal.com is like that.
i have tried basic image loader
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body><img src="http://iv1.lisimg.com/image/2359052/600full-kim-rossi-stuart.jpg" />
</body>
is this geographically targeted??/ or something like this?
please suggest

Issues forcing IE9 to render like IE8

I'm trying to render a webpage in Explorer as IE8, since IE9 is doing a great mess with CSS and not showing the #font-face.
I read the Microsoft Documentation here: http://msdn.microsoft.com/en-us/library/cc288325%28v=vs.85%29.aspx and other related topics like IE9 does not at all care about 'X-UA-Compatible' meta tag and Force IE9 to emulate IE8. Possible? and none resolved my issue, either I am very dumb (witch can be) or I can't find the problem.
The webpage is: karactermania.com/web2012/betty and I'm using the CMS Textpattern to build it.
I tried with:
<!-- Enable IE8 Standards mode -->
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<!-- Enable IE8 Standards mode -->
<meta http-equiv="X-UA-Compatible" content="IE8" /> (as I found some examples written with and without the "=")
<!--[if IE 9]>
<meta http-equiv="X-UA-Compatible" content="IE8" >
<![endif]--> (desperate attempt)
Complete HTML declaration:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="es" xmlns:fb="http://ogp.me/ns/fb#">
<head>
<!-- Enable IE9 Standards mode -->
<meta http-equiv="X-UA-Compatible" content="IE8" />
If anyone can point where the error is and how can I fix it, will earn my eternal gratitude :)
Thanks
I had the same problem as you. My X-UA-Compatible header was ignored. I found the solution in this post
The x-ua-compatible header has to be in the head section, before all other elements except for the title element and other meta elements

Birt report viewer not working in IE9

I am using birt report viewer to display report,
It works fine in IE8 but viewer not working in IE 9.
Please help.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> </title>
</head>
<body>
<birt:viewer
id="birtViewer"
reportDesign='<%=request.getParameter("name")%>'
height="650"
width="900"
showParameterPage="false"
svg="true" >
</birt:viewer>
</body>
</html>
Go to webcontent/birt/pages/layout/FramesetFragment.jsp
Add this line
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
as
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
<LINK REL="stylesheet" HREF="birt/styles/style.css" TYPE="text/css">
Open IE9.
From the top menu bar, click Tools--> Compatibility View settings --> check the box ‘Display all websites in Compatibility View’.
Click on the 'Close' button.
This should get the BIRT viewer working and the report will be displayed.

IE8 - Chinese Chars - Strict vs. Transitional Doctype

Redesigning a website I've moved from
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
doctype to
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
doctype.
My content-type meta tag is:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Unfortunately, in IE8, chinese characters now show up as blank squares.
Reverting to the transitional doctype solves the issue, as does adding the following directive:
<meta http-equiv="X-UA-Compatible" content="IE=7" />
Is there another way of solving it without sacrificing proper IE8 rendering?
Edit:
Here's a minimal example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>片瓜片南語</body>
</html>
If I remove the doctype it displays ok

Resources