Question

Hello to all the community.

First of all I'd like to thank everyone for hundreds of great answers I found here in the past. It is probably the first time I don't find one.

I discovered today that my IE11 does not digest $.data() when a page is first opened in its tab. Here's the test code (http://dmit.izihost.com/temp/test_IE11_jQuery.htm):

<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="fr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>

$(function(){

    $('#do').data('data1', '1');

    $('#do').html($('#do').html() + '<br>Document Ready: ' + 
        $('#do').data('data1') + 
        " - Here the data is still present"
    );

});

$(window).load(function(){

    $('#do').html($('#do').html() + '<br>Window Load: ' + 
        $('#do').data('data1') +
        " - Here in IE11 the data is lost when page is opened for the first time; but present after reloading (F5, Ctrl+F5 etc.) in the same browser tab");

});

</script>
</head>
<body>

<div id="do"></div>

</body>
</html>

Try to open it with IE11 (if you test locally, drag-drop the file into the browser rather than double-click), then refresh the page, then open it again in another tab/instance.

I find nothing of the sort in Google. Can someone please shed the light on this issue? It seems to be rather ugly, unless it's a temporary bug.

Good day!

D

P.S. IE version: 11.0.9600.16518

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top