Questions tagged [load-order]
30 questions
344
votes
6 answers
load and execute order of scripts
There are so many different ways to include JavaScript in a html page. I know about the following options:
inline code or loaded from external URI
included in or tag [1,2]
having none, defer or async attribute (only external…

Bergi
- 630,263
- 148
- 957
- 1,375
81
votes
10 answers
Waiting for dynamically loaded script
In my page body, I need to insert this code as the result of an AJAX call:
Loading jQuery
Using jQuery
at the bottom on line 444 not loading in the right order. When the…
fuzzybabybunny
- 5,146
- 6
- 32
- 58
3
votes
2 answers
Loading javascript after html page load
I'm trying to make sure that an external javascript file loads last on the page.
The javascript file "script.js" (which controls the image slider) should be last. I suspect it's not loading last right now because my webpage is covered with a red…

Sophia Chung
- 61
- 6
1
vote
1 answer
What code in Rails is not evaluated at runtime (ie: ActiveRecord scopes, etc)
If you try to evaluate the current date in an ActiveRecord scope, it will likely be incorrect due to this being evaluated when your application code is loaded instead of at runtime. You have to pass this through in a lambda, like this:
scope…

Blastula
- 494
- 6
- 17
1
vote
0 answers
JavaScript - diferent execute/load-order in diferent browsers
Does anybody have any idea why the following code will be executed in different order in different browsers? Code is in an external file embedded in a plain HTML page between using