101
Views
6
Comments
Issue with loadTimes in IE 11 (
Question

Hi all,


I'm facing one issue with, it seems, the way the platform measures Apps (Analytics).

When using IE a JS error is being raised:

Unable to get property 'loadTimes' of undefined or null reference

This is placed in a script at the bottom of the page:

<script type="text/javascript" charset="UTF-8">$(window).load(function () {
   var now = performance.now();
   window.setTimeout(function() {
        function getData() {
            var timing = performance.timing;
            var requestEntries = performance.getEntries();
            var requestInfo = window['outsystems'].internal.requestInfo;
            return {
                EspaceName: requestInfo.espaceName,
                PageName: window.location.pathname, //requestInfo.webScreenName,
                JSFilesCount: requestEntries.filter(function(element){return element.name.indexOf('.js')> -1;}).length,
                CSSFilesCount: requestEntries.filter(function(element){return element.name.indexOf('.css')> -1;}).length,
                FilesCount: requestEntries.length + 1,
                TimeToFirstByte: timing.responseStart - timing.navigationStart,
                TimeToDOMContentLoad: timing.domContentLoadedEventEnd - timing.navigationStart,
                TimeToFirstPaint: Math.round((window.chrome.loadTimes().firstPaintTime * 1000) - (window.chrome.loadTimes().startLoadTime * 1000)),
                TimeToLoad: timing.loadEventEnd - timing.navigationStart,
                TimeToFinish: Math.ceil(now),
                IsFirstLoad: requestEntries.filter(function(element){return element.duration == 0;}).length == 0 ? 1 : 0,
                LoadDuration: timing.loadEventEnd - timing.loadEventStart,
                RawData: JSON.stringify(requestEntries),
                PageCSS: JSON.stringify(requestEntries.filter(function(element){return element.name.indexOf('.css')> -1;}).map(function(element){return element['name'];}))
            };
        }
     
        $.post('//' + window.location.hostname + '/Measures/RunTest.aspx',  getData()).done(
            function(data){
                if(data !== 'none') {
                    window.location = '//' + window.location.host + data;
                }
            });
    }, 2000);
});</script>


Anyone faced the same issue?

Any solution?


2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Hélder,

What Platform version are you using, and what IE version?

2022-08-05 20-06-58
Hélder Anselmo

Hi Kilian,

I'm running P.10.0.1005 and IE 11.0.9600

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

That should work. I'll ask around.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Hélder,

It seems window.chrome is indeed not supported in IE (support starts with Edge). I would suggest you contact Support for further questions.

2022-08-05 20-06-58
Hélder Anselmo

Hi Kilian,

I'm gonna ask Support to help!

Thanks for your time! :)

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

You're welcome :)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.