Questions tagged [deferred-loading]

Use this tag for questions related to deferred loading of script, style and other resources into a web page.

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…
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…
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:
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…
Huangism
  • 15,324
  • 5
  • 45
  • 64
21
votes
2 answers

Any good reason not to use // Larger file // Small file Though second in order…

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…
tonitone120
  • 1,332
  • 1
  • 1
  • 16
9
votes
2 answers

Interaction between jQuery .ready() and