frequently asked question
Jan 31, 2023

Will there be performance problems with multiple scripts loaded on the page? Wouldn't it be better if all functionality was compiled to one script?

All scripts are loded asynchronously using defer or async tags, they never block the main thread. Each solution is self-contained and can run independently as soon as it’s loaded without causing waterfalls.

They all are intercompatible and couple together once they run. Each script is strongly cached on a CDN and on the user’s browser.

Bundling multiple scripts would lead to an exponential amount of variations that could be very hard to cache effectively, as an update to one of them would require invalidating all variations that include it since HTTP/2 concurrent requests are very performant, and edge cases like slow networks are likely to improve with HTTP/3.

This also serves as a version control system using @ 1 in script tag allows us to push updates to solutions without requiring users to update script tags. If something breaks with CMS Nest, we can push a fix to all CMS Nest implementations.

Check more questions and answers

Attributes
Jan 31, 2023

Will there be performance problems with multiple scripts loaded on the page? Wouldn't it be better if all functionality was compiled to one script?

All scripts are loded asynchronously using defer or async tags, they never block the main thread. Each solution is self-contained and can run independently as soon as it’s loaded without causing waterfalls.

They all are intercompatible and couple together once they run. Each script is strongly cached on a CDN and on the user’s browser.

Bundling multiple scripts would lead to an exponential amount of variations that could be very hard to cache effectively, as an update to one of them would require invalidating all variations that include it since HTTP/2 concurrent requests are very performant, and edge cases like slow networks are likely to improve with HTTP/3.

This also serves as a version control system using @ 1 in script tag allows us to push updates to solutions without requiring users to update script tags. If something breaks with CMS Nest, we can push a fix to all CMS Nest implementations.

false
false
Go to FAQ page
Subscribe

Sign up for future releases!

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.