Added Subresource Integrity (SRI)

This commit is contained in:
Ben Croker 2021-01-06 12:41:22 +01:00 committed by GitHub
parent 305f0b436e
commit 2499401500
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,7 +97,13 @@ It can be used via [NPM](https://www.npmjs.com/) as "`htmx.org`" or downloaded o
[unpkg](https://unpkg.com/browse/htmx.org/) or your other favorite NPM-based CDN:
``` html
<script src="https://unpkg.com/htmx.org@1.0.2"></script>
<script src="https://unpkg.com/htmx.org@1.1.0"></script>
```
For added security, you can load the script using [Subresource Integrity (SRI)](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity).
``` html
<script src="https://unpkg.com/htmx.org@1.1.0" integrity="sha384-JVb/MVb+DiMDoxpTmoXWmMYSpQD2Z/1yiruL8+vC6Ri9lk6ORGiQqKSqfmCBbpbX" crossorigin="anonymous"></script>
```
## <a name="ajax"></a> [AJAX](#ajax)