I have a indexedDB web app which works fine in IE10 but not in IE11. The problem is that in IE11 window.indexedDB is undefined. Is IndexedDB still supported in IE11? If so, how do you open a IndexedDB database without window.indexedDB?
My Test HTML:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
Hello
</body>
</html>
Output from F12 Developer Tools console:
window.indexedDB
undefined
window.msIndexedDB
undefined
window.navigator.userAgent
"Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; .NET4.0E; .NET4.0C; Tablet PC 2.0; rv:11.0) like Gecko"
After resetting the IE settings to the defaults, everything now works fine.
the problem is that in debug mode, default document mode is set to 9.
IE 9 doesn't support indexeddb.
Go to Developer tool, and set Documentation mode to 10 or above.
br,
Jan
Related
Our application uses embedded IE control, and we noticed that setting:
document.body.innerHTML it to <P><HR> causes an OLE exception "Unknown runtime error".
I could reproduce this in the IE browser itself (IE version 8).
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Untitled</title>
<script>
function load(){
// alert(document.body.innerHTML)
document.body.innerHTML = '<P><HR>';
}
</script>
</head>
<body onload="load()">
</body>
</html>
If the body.innerHTML is set to <P></P><HR> all is good. but the problem that the HTML strings are coming from a DB. Why is this happening and how can this be fixed?
EDIT: The code works fine on IE11. but the problem exists on systems with IE8. no matter if I change FEATURE_CONTROL_BROWSER_EMULATION key. Is there anything could be done for IE8?
The MSIE WBC (Web browser control), whether hosted by a Delphi or .net desktop application use IE7 Emulation by default.... To determine which IE emulation mode your hosted WBC is using add the following snippet to the onload event.
alert(document.documentMode?document.documentMode:'n/a');
To make your WBC use the IE emulation mode you need to add a registry entry in the FEATURE_CONTROL_BROWSER_EMULATION key in the registry.
see the documentation here - https://msdn.microsoft.com/en-us/library/ms537184%28v=vs.85%29.aspx
to get your invalid markup to work.
1. use a valid document type declaration. ().
2. change your FEATURE_CONTROL_BROWSER_EMULATION value in the registry to emulate IE8 or higher....
Ideally you want your WBC to emulate IE11 and modern web standards for html5, but that may not be possible if your existing markup is pre-HTML5,CSS 3.(viz: your markup was developed for IE6 on an intranet website, using DHTML (the early MS versions of HTML).
In Chrome, when you look in the Developer Tools, you can see the HTML5-video calls it is making. (I'm serving them chunked per MB, so every 10-12s there is 1 file downloaded).
But in Firefox (with Firebug), I can't see these calls?
How is that possible, and what can I do to show these?
This is the HTML page I'm showing:
<html>
<head>
<link rel='stylesheet' href='/icons.css' />
<!--
<link href="/video-js.min.css" rel="stylesheet">
<script src="/ie8/videojs-ie8.min.js"></script>
-->
<link rel='stylesheet' href='/style.css' />
</head>
<body>
<video id="my-video" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" width="640" height="360" poster="/thumbs/movie.jpg" data-setup="{}" preload="none">
<source src="/movie.mp4?read=1" type='video/mp4'>
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a web browser that
supports HTML5 video
</p>
</video>
<!--
<script src="/video.min.js"></script>
-->
</body>
</html>
In Chrome I can see this:
GET /movie.mp4?read=1 HTTP/1.1
Host: ******
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Accept-Encoding: identity;q=1, *;q=0
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Accept: */*
Referer: http://*****/movie.mp4
Accept-Language: nl,en-GB;q=0.8,en;q=0.6,en-US;q=0.4,fr;q=0.2
Range: bytes=4000000-
In Firebug... Nothing...
I tried already looking it up on Google, but or I am not using the right terms, or noone else had the same issue before.
I'm hoping that someone here can point out what I could do about this.
Thanks!
First I thought this might be a bug in Firebug. And as Firebug is officially discontinued, the Firefox DevTools should be used instead. But I realized that the DevTools have the same problem, which gave me the idea that this must be an underlying issue.
So, the actual reason is that the video is cached once it's downloaded and reloading the page circumventing the cache with Ctrl+F5 or disabling the browser cache doesn't cause to it to be downloaded again.
You need to clear the cache (via the dialog available via Firefox menu > History > Clear Recent History... or by pressing Ctrl+Shift+Del). Then the video is downloaded again and shown in the network request lists in Firebug and the Firefox DevTools.
Firebug:
Firefox DevTools
There are several bugs filed for this. One of them, related to the Firefox DevTools, is bug 1277514.
<!DOCTYPE HTML>
<html>
<head>
<!-- Mimic Internet Explorer 7 -->
<meta http-equiv="X-UA-Compatible" content="IE=IE8" />
<title>Plania 7.3 Redirector</title>
</head>
<body>
<p>Content goes here.</p>
<meta HTTP-EQUIV="REFRESH" content="5; url=/PlaniaWS/LoginPage.aspx">
</body>
</html>
My Company has a old web Product where the old Version requires Internet Explorer 8.
Using compatebility worked just fine, but With Windows 10 and Edge(Spartan) this no longer Works.
I have noticed other pages are able to make Edge(Spartan) generate the following Message to the user.
How do you make that happen?
I have tried:
<!DOCTYPE HTML>
<html>
<head>
<!-- Mimic Internet Explorer 7 -->
<meta http-equiv="X-UA-Compatible" content="IE=IE8" />
<title>Plania 7.3 Redirector</title>
</head>
<body>
<p>Content goes here.</p>
</body>
</html>
Screenshot of the "error Message" that Edge(spartan) can give users.
EDIT:
Im aware the this is not a good long term solution, the New Version of the Product does not have any browser dependency. But i want to provide support for the old Version so it Works With updates OS.
It might be impossible before, but it is possible now with IE 11.
The answer is using Enterprise mode for IE11. I believe you find all you need from here:
Use Enterprise Mode to improve compatibility
There are two versions of Enterprise Mode schema (v.1 and v.2), it is recommended to use v.2 as suggested by here.
Below is something not easy to be found:
Make Enterprise mode for IE11 work on Windows 7
Current latest version of IE11 on Windows 7 is
version 11.0.9600.17483 (update version 11.0.20)
To make that IE11 work with Enterprise mode , you must install at least cumulative update - KB3160005 for Windows 7.
Open all intranet sites with IE
You forward all intranet over to IE, by enabling this policy:
Administrative Templates\Windows Components\Microsoft Edge\Sends all intranet traffic over to Internet Explorer
This feature works when you input http://site-name format in Edge address bar.
Note: After testing, if URL includes domain name, like http://site-name.contoso.com, Edge will open the site inside itself.
I apologise for asking a question asked ten thousand times on SO before. This situation seems different from the others. In short, video playback via always works on Firefox and Chrome but always fails in Internet Explorer, all versions, all Windows versions.
I have a web page set up according to Microsoft's HTML5 suggestions. A modal window supplies the video:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
</head>
<body>
<div class="popupwindow">
<video controls autoplay preload="auto" style="width:100%">
<source src="streamvideo.rails?file=$fileName" type="video/mp4" />
</video>
</div>
</body>
</html>
streamvideo.rails is a Castle Monorail C# function that acquires a video file in a cloud server as a Stream and streams it back as a range request.
First off, I'm sure it's not the usual problems: the codec is probably OK, the response's Content-Type is right (video/mp4) and IE is even picking up the video correctly, at least initially. The in-browser network sniffer shows it received a small chunk of an MP4 file and then stopped.
One oddity I noticed: IE is not framing the video request as a range request whilst Chrome/FF are. Chrome's headers:
GET [my URL]?fileName=e65b0b0d-0911-4e3f-bc71-7b5d5a65db57.mp4 HTTP/1.1
Host: localhost
Connection: keep-alive
Accept-Encoding: identity;q=1, *;q=0
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36
Accept: */*
DNT: 1
Accept-Language: en-US,en;q=0.8
Range: bytes=0-6130
IE's headers:
GET [same URL] HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Accept: */*
GetContentFeatures.DLNA.ORG: 1
Pragma: getIfoFileURI.dlna.org
Accept-Language: en-US
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
DNT: 1
Host: localhost
I speculate that if I fix this discrepancy, the problem will go away. So: why is IE deciding not to make a range request? How can I force it to? If you think I'm chasing a bogus clue, what else can I check?
This is a little late for a response. Just thought if somebody searches this, my answer would help them. What I found is that when IE requests the video content the "Accept-Ranges: Bytes" header is not present as with Firefox and Chrome, thus on first request set the response as follows (This is an ASP.Net Core example):
response.Headers.Add("Accept-Ranges", "bytes");
response.ContentLength = [length of actual video file];
response.StatusCode = (int)HttpStatusCode.OK;
response.ContentType = [ContentType of requested content];
When the response hits the browser again it will evaluate the headers and setup the video control as well as the next request with the correct headers. Now when you validate for the existence of the Range header it will be there and the code to stream will work as normal.
Hope this helps, it worked for me.
Elaborating on Jean Roux's response:
HTML5 video streaming is supported via range requests and responses. MDN has a good introduction: https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests
IE10 and IE11 on W7 and W8 do NOT make range requests (there is no Range header). Per the RFC, the server may respond with a 200 response and the entire file contents. But doing so will cause IE to not play the file (I'm not sure why, but based on the network tab in dev tools, the content is truncated, e.g. server sent ~10MB but IE was only looking at the first few KB). I had to rejigger my server so that I respond with a 206, the entire file contents, and Accept-Ranges and Content-Range headers.
BTW: you asked this before W10 was released. Both Edge and IE11 on W10 DO make the range requests.
I'm having the same issue with Chrome on Android. The range header is missing. For Internet Explorer I did something like this:
$http_range = (isset($_SERVER["HTTP_RANGE"])) ? $_SERVER["HTTP_RANGE"] : "bytes-0";
Thats in my PHP script that serves the video/mp4 data. All it does is check if the range header is set, if not, it will assume that the start of the file has been requested. Internet Explorer seems to be smart enough to then take over if the user seeks to a different part of the video, i.e. generates the required range header.
Works great in IE... however, I tried the above in Chrome and it's still not happy :((
I had the same problem.
MIME was set correctly. It was video/mp4.
I checked apache config. It supported video/mp4 and audio/mp4.
The video was encoded by H.264.
I could see the video in chrome, not in IE( from 9, 10, 11 ).
I changed the video size from 1920 x 1280 to 720 x 720 and encoded.
And it worked magically.
Now I'm searching why it worked by changing the video's width and height.
in my header I have:
<!--[if lte IE 8]>
<meta http-equiv="refresh" content="0; url=/ie-sucks" />
<script type="text/javascript">
/* <![CDATA[ */
window.top.location = '/ie-sucks';
/* ]]> */
</script>
The above code easily redirect the users which are using < IE 8 to another place ie-sucks
So this is working fine, but I just was checking the users, after they redirect to /ie-sucks, they open Mozilla Firefox and again copy paste the mysite.com/ie-sucks into the address bar, so then again they will encounter to that page...
I know this is stupid, but I need to redirect them from that page to the main site IF they are not below than IE8 OR using other browsers...
I fixed the IE users with this:
<!--[if !lte IE 8]>
But this code won't apply on Fiefox users...
How I could detect non-IE users and redirect them?
Thank in advance
The <!--[if ... ]> will only be handled by IE, that's the trick.
For redirecting Firefox or other browsers, you should better separate by user agent (but bear in mind, that changing the user agent is really simple!). This could be done using PHP for example:
<?php
$useragent = $_SERVER['HTTP_USER_AGENT']; //get the user agent
if(!strpos($useragent, "MSIE")) {
// user agents from IE should always look like this and include 'MSIE':
// Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64)
header("Location: http://example.com/");
}
?>
There might also be a JavaScript way by handling the user agent like this:
if(navigator.userAgent.indexOf('MSIE') == -1) { ...
But again: Keep in mind, that there could also be user agents, that could have "MSIE" inside their string or users with Internet Explorer, that will change it to "Firefox" or else. So this is not a fail-safe solution, but I guess, that could be an answer to your question.
PS: Why should anyway someone copy the URL from the IE conditional to its browser and view the "No IE wanted here" message? Anyone doing this should know, he isn't really using IE, so this shouldn't be confusing. You're making to many thoughts. You can't figure out all behaviors that other people will do ;)
You're just going to tie yourself up in knots doing what you're trying to do.
How about just displaying a message at the top of your page if users are using IE8 or less like in your original conditional statement?
Your message will simply suggest upgrading their browser or downloading Chrome, Firefox or whatever and also have the ability to close/hide the message.
<!--[if lte IE 8]>
.my-message {
display: block;
}
<![endif]-->