Closed BlackKite84 closed 5 years ago
@BlackKite84 yes, there is an option called append_defer_js
to make defer.js script inline. Just $defer->append_defer_js = true
.
plz check polyfill?
https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver
/ Disable minification (remove .min
from URL path) for more info /
It is an external js file which is cached on your browser in the first request. Your browser does not download it later unless you clear browser data.
Polyfill script should not be inlined because its content is automatically generated, that means the js file is changed on different browsers.
Back to your first question, we should not inline external script files, because inlining scripts does not take advantages of browser caches. Processing external files on-the-fly may make your server heavier and your HTML file (which is not cached by browser as default) bigger. Downloading bigger file means it may be slower and use much more bandwidth.
i need a local version, dont wont externel request
@BlackKite84 So you need to download below script files and load it from your local environment.
https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@1.1.5/dist/defer_plus.min.js https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@1.1.5/dist/polyfill.min.js
DeepL Translation: Can you insert an option for deffer_min.js. The one that inserts the script inline of HTMl and not external?
Kannst du eine Option für deffer_min.js einfügen. Die den den Script inline des HTMl einfügt und nicht externe?