Consistent issue with elementor-frontend-inline-css content only partially delivered under Full Page Cache delivery #27320
Labels
status/awaiting_triage
Indicates when an Issue, Pull Request, or Discussion awaits to be triaged.
Prerequisites
Description
It's been years since we're facing this issue.
For some reason, when using W3 Total Cache's Page Cache functionality, randomly, some Elementor pages (not all of them, not always the same...) will be delivered broken.
By broken, I mean it misses some CSS rules, so that the page doesn't look like it should.
Digging a bit deeper, and comparing the same page broken against the expected one, the only single difference seems to reside in the content of the CSS elementor-frontend-inline-css section: on the broken page, this CSS content is empty, or only partially delivered.
So here is how a broken page looks like against the expected one, and you'll find, attached the guilty CSS section's contecnt, for both of them:
The Elementor setup doesn't seem to be involved:
We tested it from multiple server environments, with minimal plugin setup.
Some topics suggest to disable the CSS minifying from W3 Total Cache, or to exclude Elementor from being cacheable , but I experienced both of them myself: it doesn't work, the error still occurs.
Another solution seems be to enable W3 Total Cache's "Late Caching" option, but it doesn't work either.
Finally, I also checked that it's not related with the (automatic) Preload functionnality. Page cache triggerd manually is enough to get the issue.
To my understanding, after countless tests about this specific issue, the problem seems to be that the page caching process sometimes "flashes" the page before all the content has been fully delivered, especially the content of this CSS section:
elementor-frontend-inline-css
.The files enclosed, shows that the broken code misses the all of the element-id-... rules.
Having only the very few plugins for our theme to work don't make the issue disappear.
Howver, it also seems that the occurence of this issue might depend on the order in which plugins were activated, since whe deactivating a (supposed) trivial one seems to solve the issue, but reativating it WOULD NOT make the issue appear again.Of course, I ran these tests multiple times, and thought of flushing all W3TC's caches, and the test browser cache between plugins activations/deactivations.
I know I'm not the only one facing this issue, since there are dozens of topics started about that specific problem.
I also know this is not related to a specific cache plugin. A developer I work with, who took an eye to our case, says he faced the very same issue in a couple of projects, also a few years ago. When Elementor was teamed up with W3 Total Cache or WP Rocket to tackle massive Elementor's impact on page time delivery, the same kind of issues occured.
My experience show the same results with W3TC handling all the cache topics, but also when entrusting CSS/JS cache tasks to Autoptimize. And finally with WP Rocket as well.
To my understanding, the problem is, that the Page Cache service sometimes caches the pages / objects a bit too early, so that it misses some part of the expected content. So that once the page is cached, it's consistently delivered broken. So the problem would be that page cache plugins would require a signal to know when the page is fully loaded.
Could you deliver such a signal? Or any other solution?
Honestly, we can get over Elementor's performance impact if using page cache. But if Elementor is prevents us to use page cache, then it's just a no go, and we'll have to abandon your plugin.
Thanks for considering.
Steps to reproduce
Expected behavior
Isolating the problem
Elementor System Info
Click to reveal
Agreement
The text was updated successfully, but these errors were encountered: