3 ms·
Sense. It makes a difference if you run an old javascript file before loading its new replacement and running that. As in, Original script: <script> l
by jasonkester 10y ago
Sense. It makes a difference if you run an old javascript file before loading its new replacement and running that. As in,
Original script:
<script>
location.href="http://google.com";
</script>
New script
<script>
// oops! forgot to remove this
// location.href="http://google.com";
</script>
You'll want to make sure you have the right version in place before you try to run either of them.
- eloff 10y agoYou have a point. What about CSS? At first I think it would just render funny, but some javascript actually interacts with the CSS, e.g. jQuery selectors based on style classes or something. So it has the same problem really. Images would be safe. Or an alternate plan, start rendering, but do not run the javascript until the resource checks for css+js files return. It would slow things down some more, but not as much as waiting for everything.
- jasonkester 10y agoBefore: body { background:blue; } After: body {} It would play out similar to the Flash of Unstyled Content issue, but substituting "unpredictably wacky" for "unstyled".