Use this tag for questions related to deferred loading of script, style and other resources into a web page.
Questions tagged [deferred-loading]
94 questions
64
votes
7 answers
CSS delivery optimization: How to defer css loading?
I am trying to optimize the CSS delivery following the google documentation for developers https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery#example
As you can see in the example of inlining a small CSS file the critical CSS in…
![](../../users/profiles/2456038.webp)
RafaSashi
- 14,170
- 8
- 71
- 85
42
votes
2 answers
Defer loading and parsing of PrimeFaces JavaScript files
While analyzing the performance of a JSF 2.1 + PrimeFaces 4.0 webapp with Google PageSpeed, it recommends among others to defer parsing of JavaScript files. On a test page with a and a form with and which…
![](../../users/profiles/157882.webp)
BalusC
- 992,635
- 352
- 3,478
- 3,452
40
votes
5 answers
DEFER or ASYNC allowed on a stylesheet include?
I know script files can use the DEFER and ASYNC keywords on a resource include. Do these keywords also work for stylesheet (i.e., CSS) includes?
Syntax would presumably be:
![](../../users/profiles/787794.webp)
Doug
- 4,486
- 9
- 29
- 39
37
votes
5 answers
Speed up page load by deferring images
I am creating a page which will contain a lot of large sized images, so naturally I want to make sure the page loads without too much trouble. I read this article here http://24ways.org/2010/speed-up-your-site-with-delayed-content
The method of…
![](../../users/profiles/1058134.webp)
Huangism
- 15,324
- 5
- 45
- 64
21
votes
2 answers
![](../../users/profiles/958584.webp)
Bradley Flood
- 8,235
- 2
- 41
- 41
10
votes
2 answers
Do modules prevent the need to use the DOMContentLoaded listener?
document.addEventListener('DOMContentLoaded', () => {
});
I read that this event listener made sure, for regular scripts, that the JS wasn't going to reference nodes that hadn't been loaded yet. The content executes after DOMContentLoaded has…
![](../../users/profiles/14037283.webp)
tonitone120
- 1,332
- 1
- 1
- 16
9
votes
2 answers
Interaction between jQuery .ready() and
I am trying to figure out a problem with some code I have inherited.
I have an HTML page with