Defer attribute on Siteglide scripts
under review
Matt Jones
Omar requested this:
Is there a way to add DEFER attribute to system generated scripts when loading polyfill.min.js, siteglide.js, siteglide_ecommerce.js?
Log In
M
Matt Jones
Just thinking, do we still need polyfil.js support for ES6 features if Internet Explorer is not supported anymore? Best practice would also be to use something like modernizer which only pulls in the polyfil if the browser requires it- allowing the majority of browsers to skip it and save a synchronous request!
Matt Walter
under review
O
Omar Paulo
hi Dean,
Yes we can remove the system generated JS files, but that also prevents any form submission. Which is not an option. It's been over a year, is there hope for this feature?
Dean Vizer
Omar Paulo: Correct, that was added alongisde this for pages where the script isn't needed at all. It doesn't change this task which is why we've left it open.
While not on our immediate task list (it is currently queued) this is something that we will do and will update this entry when progress is being made
Dean Vizer
As a note, you can now remove both polyfill and siteglide JS files by adding a flag under metadata in pages via CLI. We have documented this at the bottom of the page here - https://developers.siteglide.com/pages-with-siteglide-cli
We will continue exploring deferring the files mentioned above
N
Nick Fenmor Collins
Dean Vizer: Thanks Dean Vizer ..that's great to hear :-)