With the SDK for the Web, you have two options for how the end customer gets the library.
- You can download the file from the npm registry, and serve this file from your servers.
- You can serve the file via CDN. JSdeliver and unpkg are two services that serve all npm packages, including Scandit's.
With each approach, there are tradeoffs.
Serving the file yourself means that you have full control over the availability of the library. Additionally, most CDN services do not offer compression. Depending on where you self-host things it may be faster because the browser requests the assets from the same server instead of self-hosted-website server + CDN server separately.
Serving the file via CDN allows you to either incorporate the latest library or to specify a version. We recommend always specifying a version of the library, which means that your application won't be impacted by any changes we make (especially breaking changes).