Versions and caching

Latest script

https://playerstack.techskills.academy/playerstack.min.js always serves the newest release. Browsers and the CDN may keep it for up to 5 minutes (plus 10 minutes while revalidating), so fixes reach your visitors shortly after a release. Provider and plugin files load from the same directory with a content hash in the query string, so they can be cached for a year.

Pinned version with Subresource Integrity

Every release that changes the bundle is also published under /v/<id>/, where the id is derived from the content of its files. These URLs never change and are cached as immutable. Providers and plugins load from the same versioned directory, so a pinned page never mixes files from different releases. A pinned page does not receive fixes until you update the snippet.

Current version: bd50f5bf47d3, published .

<script
  src="https://playerstack.techskills.academy/v/bd50f5bf47d3/playerstack.min.js"
  integrity="sha384-LtZgqoEPPTtLuR5ulpWtZF0k2CcxUt7NJaqbELYWRCTkwhl+HtSzVA3Snu7JAxRT"
  crossorigin="anonymous"
  defer
></script>

The integrity hash covers playerstack.min.js. The files it loads later come from the same immutable directory; their hashes are listed in /v/versions.json (newest first, with the publication date and every file's sha384 hash). Older versions stay available after later releases.

Content Security Policy

Allow the directory, not only the main file: script-src https://playerstack.techskills.academy/ for the latest script or script-src https://playerstack.techskills.academy/v/ for pinned versions.