Closed (works as designed)
Project:
Critical CSS
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
5 Feb 2019 at 05:39 UTC
Updated:
7 Feb 2019 at 02:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kentr commentedComment #3
albertosilvaThanks for your feedback, @kentr,
Anyway, I don't completely understand the problem with the defer option. You said that "the Defer configuration option doesn't work", but in fact that option is not available for this module.
I think that adding such an option doesn't make much sense, because the only thing that could be deferred is the Filament Group's polyfill that implements the preload strategy for non-compliant browsers. This polyfill should be as close as possible to the critical css block, in order to start loading the global css as fast as possible. Thus, deferring that block of JS or moving it to the bottom of the page is a bad idea.
Also, the patch you submitted is not working as expected, IMHO. It only displays the polyfill if the defer option is checked, which makes no sense.
Could you please give more details about the issue?
Regards,
Alberto Silva
Comment #4
albertosilvaComment #5
kentr commentedAhh...
Looking into it a bit more, I think I had started to add a "Defer" option on my dev copy, and then came back to it later thinking it was already part of the module.
Background:
I'm working with Critical CSS and the AdvAgg module together, and noticed that this module's rewrite of the CSS (and the polyfill) overrides the AdvAgg defer options.
Only the AdvAgg version of the CSS deferment was being recognized by PageSpeed Insights as actually being non-blocking, so I wanted to allow the AdvAgg defer settings to work while still using this module for the inline critical CSS.
That is the intention.
If "Defer" is disabled, then the module won't rewrite the CSS to defer loading of non-critical CSS. In this case, the Critical CSS module would only inline the critical CSS.
The assumption is:
I'll close this.