GWT application is not showing in IE - javascript

I have a GWT 2.6 app which works fine on every browser except in IE (IE11). I am compiling application for all browsers. Using developer tools (console posts) i can see that application does load as it should be, but the page is blank and nothing is shown. No error appears in console and there is only a warning...
HTML1524: Invalid HTML5 DOCTYPE. Consider using the interoperable form "<!DOCTYPE html>".
File: user, Line: 1, Column: 1
...concerning application HTML file. I removed all Views and Widgets and left only basic view with some background and picture, and it still does not load properly only in IE.
I tried adding
<meta http-equiv="X-UA-Compatible" content="IE=5,6,8,9" >
to app html file but it doesn't make a difference nor does a Compatibility View settings and changing Document Type. I really do not care so much about app working in older IE versions, but >9 is preferable.
What am i missing here?
EDIT:
Actually the problem was having DockLayoutPanel in my View. Changed DockLayoutPanel into DockPanel and the application appeared (with some differences comparing to UI in other browsers).

Make sure that your html host page is properly formatted. It should start with the DOCTYPE declaration, followed immediately by <html> tag:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
...

Related

Is it possible to have different meta tag to render CSS and a different meta tag to render javascript?

I have an desktop application which is using ie7 engine to render and now We are updating it to ie9 only.
To get CSS3 support We update existing meta tag <meta http-equiv="X-UA-Compatible" content="IE=7" /> to <meta http-equiv="X-UA-Compatible" content="IE=9" /> and it's working fine.
But an issue application has plenty of java script file which written based on ie7 render engine, that's why it's throwing many run time errors. it'll take a lot of time to fix.
So, Is there any way which can force all java script to use ie7 meta or engine while rendering?
Any help would be much appreciated...

How to set Documents mode Quirks in asp.net

i am using IE 10 and i want to make Document mode of browser set to normal Quirks not IE 5 quirks of my website.I put <meta http-equiv="X-UA-Compatible" content="IE=10;IE=9;IE=edge"> in my master page but no luck,Can anybody share your thoughts
Check if you have included the doctype at the top of your master page.
<!DOCTYPE html>
If the browser supports the above tag(HTML5),It will make the browser to render the page at its highest version.
And the meta tag should be like this:
<meta http-equiv="X-UA-Compatible" content="IE=10,9,edge">
IE9 and below versions will render the page to IE5.5 version in Quirks mode.
MSDN Reference

Visual Studio 13, redirect a HTML5 webpage to external website?

I'm not experienced with Visual Studio 13 at all, but I managed to compile a simple HTML5 website so that it displays in an app.
I run a website, that I'd basically like to integrate into a Windows 8.1 UI app. I've tried code like this:
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="1;url=http://mywebsite.com">
<script type="text/javascript">
window.location.href = "http://mywebsite.com"
</script>
<title>Page Redirection</title>
</head>
<body>
<!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
If you are not redirected automatically, follow the <a href='http://mywebsite.com'>link to example</a>
</body>
</html>
however it gives me an APPHOST9624 error. Even when I click on the HREF link it fails.
Obviously I'm going about this in the wrong way, so my question is. How do I create a Windows 8.1 store app that simply displays the external website fullscreen?
Edit: You actually want to integrate the website in your store app so this solution won't work for you, just noticed that :) There also seems to be a WebView Control though all examples are in XAML, so it might not be supported in HTML5 apps...
I would recommend you launch the default browser with that new URI, though that would open a new browser instance, not sure if that's what you want in your case. For that, try calling
Windows.System.Launcher.launchUriAsync(uri).done( /* Your success and error handlers */ );
Source

Can I turn on IE 10 Compatibility View using JavaScript or HTML?

How can I turn on IE 10 Compatibility View programmatically in Javascript or HTML?
I just added the following meta tag within the <head> tag, but it is not working.
<meta http-equiv="x-ua-compatible" content="IE=EmulateIE7" >
Is there any way to do the same thing in JS?
I checked the compatibility mode article on msdn - here.
Your meta tag is still the method for enabling compatibility mode in IE 10 and IE 9.
As long as you have:
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<!-- Other meta tags etc. -->
<head>
Then it should work. You could try making the http-equiv value case sensitive (at the moment you've set it to lowercase).
Also, to answer your question about JS, you can detect whether the browser is in compatibility mode by comparing the browser engine with the browser version for IE. However, this involves browser version detection, which tends to be a bit unreliable. Also, there isn't a way for you to set the user's compatibility mode in JS. So, for the moment at least, you'll have to stick with the meta tags.
I hope this helps.
A good plugin to allow you to view http header information is IEhttpheaders. Just download it from that link & install. Then, when you start IE, go to the tools menu and select 'DisplayIEhttpHeaders...'. When you visit your site it will list the header response. If you modify your answer to include the response, then we can see if it's the problem.
You say “I just added the following meta tag within the header tag”. Do you mean:
The <header> tag
The <head> tag?
The x-ua-compatible meta tag does need to go inside the <head> tag, not a <header> tag.

How to fix Document mode restart in IE 9

I have a problem with opening my website in IE9. When I try to open my site I get this error in dev tools:
HTML1113: Document mode restart from Quirks to IE9 Standards
I googled and found an answer that suggested to use this:
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
or
<meta http-equiv="X-UA-Compatible" content="IE=IE9" />
...but these do not work and I get the following message this time:
HTML1115: X-UA-Compatible META tag ('IE=Edge') ignored because document mode is already finalized.
What is my problem? I read several articles like IE’s Compatibility Features for Site Developers by Microsoft and traced my site with Determining IE9’s Document Mode flowchart and use all suggestions relating to !doctype on these sites but no-one could solve my problem and my IE engine reset after the page opened.
I develop my site with ASP.NET 4 on Windows Server 2008.
How can I fix this issue?
One solution that should always work is to put your X-UA-Compatible in HTTP headers. Also, your <!DOCTYPE> should be specified at the top of your HTML document (<!DOCTYPE html> is the easiest one).
If you put your X-UA-Compatible declaration inside the meta tag you can run into the following problems:
X-UA-Compatible is ignored unless it's present inside the first 4k of you page. If you put it somewhere in the bottom of your head section (or in the body) move it to top. The best place for it is right after encoding and language declarations.
X-UA-Compatible is ignored if it's put inside IE conditional comments. For example:
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<![endif]-->
In this case you should remove conditional comments.
Also, you shouldn't have any text before the doctype declaration. If you've got any HTML comments there, for example, the IE will switch to quirks mode.
Finally, check if you're viewing this site from the intranet. By default Compatibility View is enabled for Intranet sites.
I suggest set X-UA-Compatible header for you page and then see if your site is still switching to quirks mode. In that case you should check your markup and try to fix any HTML validator errors until it's back to Standards Mode.

Categories