labjs

Is there a known workaround for IE9's execution order of injected script tags?

試著忘記壹切 提交于 2019-12-30 11:06:07
问题 I am sure I don't fully understand this problem, but it seems that we are seeing strange behavior on IE9 on my project, somehow related to out-of-order execution of JavaScript that has been injected via calls to document.write , e.g.: document.write('<scr'+'ipt type="text/javascript" src="'+file1+'"></src'+'ipt>'); document.write('<scr'+'ipt type="text/javascript" src="'+file2+'"></src'+'ipt>'); document.write('<scr'+'ipt type="text/javascript" src="'+file3+'"></src'+'ipt>'); My limited

Is there a known workaround for IE9's execution order of injected script tags?

扶醉桌前 提交于 2019-12-30 11:06:05
问题 I am sure I don't fully understand this problem, but it seems that we are seeing strange behavior on IE9 on my project, somehow related to out-of-order execution of JavaScript that has been injected via calls to document.write , e.g.: document.write('<scr'+'ipt type="text/javascript" src="'+file1+'"></src'+'ipt>'); document.write('<scr'+'ipt type="text/javascript" src="'+file2+'"></src'+'ipt>'); document.write('<scr'+'ipt type="text/javascript" src="'+file3+'"></src'+'ipt>'); My limited

Alternatives to YepNope and LabJS

不羁岁月 提交于 2019-12-21 02:28:10
问题 I am wanting to load javascript and css files via a resource loader. I was originally using LabJs but I found YepNope more elegant and easier to work with in my scenario. However I am finding it devastatingly slow, which is odd as apparently it is comparable to LabJs in speed on most things. One thing I do have are Etags which I am sure will slow everything down as its still requesting from the server rather than just working off the client cache. Anyway there isnt much outside of the main

Can script.readyState be trusted to detect the end of dynamic script loading?

走远了吗. 提交于 2019-12-17 15:23:25
问题 I use dynamic script loading to reduce the duration of the initial page load. To ensure that the functions and objects defined by a script are accessible, I need to ensure that the script has been fully loaded. I have developed my own Javascript library to this end, and thus did quite a lot of research on the subject, studying how it's done in different libraries. During a discussion related to this issue, Kyle Simpson, the author of LABjs, stated that: LABjs (and many other loaders) set both

Multiple conditions with yepnope

不打扰是莪最后的温柔 提交于 2019-12-10 13:27:54
问题 I use yepnope.js as a resource loaded. I want to execute code in my JS module only when all the dependencies for that module have been loaded. I do not want to load JS dependencies that already been loaded. Suppose, I have dependencies D1.js and D2.js. I tried yepnope({ load: ['D1.js', 'D2.js], complete: function() { //execute my code here } }); That works, but, resources are loaded every time, even if they were already loaded before. If I do multiple tests like that: yepnope([{ test: $().d1,

Alternatives to YepNope and LabJS

非 Y 不嫁゛ 提交于 2019-12-03 08:53:28
I am wanting to load javascript and css files via a resource loader. I was originally using LabJs but I found YepNope more elegant and easier to work with in my scenario. However I am finding it devastatingly slow, which is odd as apparently it is comparable to LabJs in speed on most things. One thing I do have are Etags which I am sure will slow everything down as its still requesting from the server rather than just working off the client cache. Anyway there isnt much outside of the main YepNope site, and they havent released a new version with the fixes on their issues list in a while, so I

Is there a known workaround for IE9's execution order of injected script tags?

给你一囗甜甜゛ 提交于 2019-12-01 09:10:30
I am sure I don't fully understand this problem, but it seems that we are seeing strange behavior on IE9 on my project, somehow related to out-of-order execution of JavaScript that has been injected via calls to document.write , e.g.: document.write('<scr'+'ipt type="text/javascript" src="'+file1+'"></src'+'ipt>'); document.write('<scr'+'ipt type="text/javascript" src="'+file2+'"></src'+'ipt>'); document.write('<scr'+'ipt type="text/javascript" src="'+file3+'"></src'+'ipt>'); My limited Google research suggests that IE9 will execute scripts injected in this manner in a different order from

Is a 200ms decrease in page load time significant? [closed]

与世无争的帅哥 提交于 2019-11-30 22:19:21
I made a few tests with lab js in one of the sites I've developed and got a reduction of 200ms in the page load time. The total time spent now after backend processing is around 1.5 seconds. I was wandering if its worth the trouble. Is 200ms a huge gain? A ridiculous one? I know that page load times affect page ranking, but 200ms will make such a big difference? Quoting Milliseconds are Money: How Much Performance Matters in the Cloud : 5) The Proof That Milliseconds Matter … The big guys in the cloud industry have really dug deep and proved that those milliseconds matter: For every 100ms

Is a 200ms decrease in page load time significant? [closed]

吃可爱长大的小学妹 提交于 2019-11-30 17:51:29
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I made a few tests with lab js in one of the sites I've developed and got a reduction of 200ms in the page load time. The total time spent now after backend processing is around 1.5 seconds. I was wandering if its worth the trouble. Is 200ms a huge gain? A ridiculous one? I know that page load times affect page

Can script.readyState be trusted to detect the end of dynamic script loading?

扶醉桌前 提交于 2019-11-27 17:31:53
I use dynamic script loading to reduce the duration of the initial page load. To ensure that the functions and objects defined by a script are accessible, I need to ensure that the script has been fully loaded. I have developed my own Javascript library to this end, and thus did quite a lot of research on the subject, studying how it's done in different libraries. During a discussion related to this issue, Kyle Simpson, the author of LABjs , stated that: LABjs (and many other loaders) set both "onload" and "onreadystatechange" on all script elements, knowing that some browsers will fire one,