Skip to main content

Content Delivery Network #

Duet serves all of its static assets through a Content Delivery Network for better performance and stability. CDN also makes it faster to implement and use our packages in production.

A content delivery network is a system of distributed servers that deliver pages and other static web content to users based on their geographic location, the origin of the webpage, and the content delivery server. Some of the benefits of using Duet’s CDN includes:

Available assets #

The following packages and all of their static assets (e.g. images, styles and scripts) are available for production usage via Duet CDN:

URL structure #

Duet Content Delivery Network uses the following URL structure for the hosted Node.js packages:<package>/<version>/<file>

To fetch e.g. the CSS Framework’s minified stylesheet using the above format, you would write it like:

Please note that Illustrations are the only exception to the above rule as they aren’t versioned. For illustrations, you need use the following URL structure:<file>

Subresource Integrity #

Subresource Integrity is a security feature that enables browsers to verify that resources they fetch from a CDN are delivered without unexpected manipulation. It works by allowing you to provide a cryptographic hash that a fetched resource must match (source: MDN).

Our documentation provides cryptographic hashes for the latest available package versions, but you can also generate these hashes yourself for older versions using e.g. openssl command line tool. To enable SRI verification, use the following tags in the <head> of your application:

Web Components:

<script type="module" src="" integrity="sha384-rsCegz4lNFoJEQKZHVwH+EwKZC9NTZTqk+miGqx9M4iOZ/iTUzumgIBDscdS73Ag" crossorigin="anonymous"></script>
<script nomodule src="" integrity="sha384-oky2mKoMxraOPHWPp5eE12zjr+WFI1HoEUEXANBDpOAMzQ+MywpgBb1AABDT7vDV" crossorigin="anonymous"></script>

CSS Framework:

<link rel="stylesheet" href="" integrity="sha384-l5M7aIJuOPUCX8hpCwhNU5e1NMtFJpR0AnsBk0lOHhbVWkzii23bSPstvxMMKoaI" crossorigin="anonymous" />

Design Tokens as CSS Custom Properties:

<link rel="stylesheet" href="" integrity="sha384-arb0dRY7eabL9qYMLabGqlrgO9p75pZ9lvaqh3xpLpNUUW6KBtRjKqkSwBv3HyLp" crossorigin="anonymous" />

Fonts for LocalTapiola:

<link rel="stylesheet" href="" integrity="sha384-5JYmtSD7nykpUvSmTW1CHMoBDkBZUpUmG0vuh+NUVtZag3F75Kr7+/JU3J7JV6Wq" crossorigin="anonymous" />

Fonts for Turva:

<link rel="stylesheet" href="" integrity="sha384-hHdwZODJ+y2QoCpmMYq9dSnwexFN8FO9B9cVru7Y7iy2l3bXKpf/vNfPASXgfKWU" crossorigin="anonymous" />

Available versions #

Duet Content Delivery Network includes versioned releases of the following Node.js packages starting from version number:

Troubleshooting #

If you experience any issues while getting set up with Duet Content Delivery Network, please head over to the Support page for more guidelines and help.