Wordpress LScache Plugin: Lazyloading multiple instances
Last Updated on: Wed, 15 Apr 2026 00:00:02 Any idea why the lazyloading js script is loaded multiple times on the page? It happens with both file and inline code. WP/Plugins are the latest version. Theme is block based/FSE. An example url with a bug can be found here: https://wecodeart.com/dev/ The page I need help with: https://wecodeart.com/dev/ The same thing happens with JS when minification/concatenation is turned on. Some JS code is executed multiple times. could you please be more specific which JS being loaded multiple times ? on my browsers request list I didnt see any duplication. Its a problem with FSE and upcoming block based themes ? as soon as I switch to normal theme everything is fine. This can be closed as that is an unreleased WP feature. Sorry to bother. Found and fixed the issue ? was related to the code from: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/table-of-contents/index.php regarding DOMDocument::saveHTML() I was using a similar approach in my theme ? you need to use LIBXML_HTML_NOIMPLIED constant to avoid multiple script tags (and also remove the generated Doctype)
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference