Elementor is loading JS referenced by JS files
-
Hello Gabe,
Thanks a lot for your fantastic plugin!
You are already aware that Elementor has created a crazy situation with their Experiments > Improved Asset Loading. Basically, they slow down the page speed loading by starting calling JS files from other JS files. This terrible improvement results in an extra second or two for the parsing of JavaScript files on a mobile device.
In the previous version, they already have started messing with a swiper JS. From another post, I have found your quick fix at https://github.com/gabelivan/wpacu-preload-elementor-swiper-js/tree/37fdeabb3243ba8539b1d52924db6b6904aa69b3 which adds something like
<link rel=”preload” href=”/wp-content/plugins/elementor/assets/lib/swiper/swiper.min.js?ver=5.3.6″ crossorigin=”anonymous” as=”script” />
to the affected page.
Many more files like that are created with the Elementor Pro 3.1 version.
In my website the list includes:
/wp-content/plugins/elementor/assets/js/text-editor.aed713532404e88b2deb.bundle.min.js
/wp-content/plugins/elementor-pro/assets/js/nav-menu.6da75281e733e539a9ad.bundle.min.js
/wp-content/plugins/elementor-pro/assets/js/animated-headline.199ba355408b0d89ddf7.bundle.min.js
/wp-content/plugins/elementor-pro/assets/js/cc7cab306f6aad49a662.bundle.min.js
/wp-content/plugins/elementor-pro/assets/js/media-carousel.8ee12224819ea050cc42.bundle.min.js
/wp-content/plugins/elementor-pro/assets/js/form.9c115e6f5683e739f4d6.bundle.min.js
/wp-content/plugins/elementor-pro/assets/js/popup.502330d9929af9beeefd.bundle.min.js
/wp-content/plugins/elementor-pro/assets/js/slides.ea0f13fa2ea9e84a1f96.bundle.min.jsThey all can be preloaded with something like
<link rel=”preload” as=”script” href=”/wp-content/plugins/elementor-pro/assets/js/form.9c115e6f5683e739f4d6.bundle.min.js” />However, it would be great to automate this process.
It looks that the Elementor development team is unprofessional enough to neglect to do it themselves. Maybe you can take this task on board to see how to automate the process of adding preload requests to the HTML files in your plugin?
Thanks for your original fix for the swiper JS.
Best regards
Victor
- The topic ‘Elementor is loading JS referenced by JS files’ is closed to new replies.