As far as I can tell this is only useful when you're linking to a resource that you link to on a CDN or a server that you don't control? The thought being: if this resource has been tampered with the integrity check will fail and the script will not load. I haven't heard of this being useful for scripts you load from your own webserver though, so CDF doesn't generate anything for that. Maybe I'm missing something though?
That's what I'm looking for - I've been performing tests by using the CDF to reduce the number of calls made on load, it seems to work so I was looking to flesh it out fully and perform some comparisons.
You're likely correct and I'm likely wrong; but as with all things Umbraco, I find it best to learn by trying! :)
The Client Dependency Framework and Subresource Integrity
Hi all,
I've been taking a look at implementing Subresource Integrity recently, but I can't see a straightforward path to implement SRI inside the CDF.
Does anyone have any experience of this, or know if it's even possible inside this framework?
Kind regards, Chris
I think you are looking for a way to add the integrity attribute? In that case, this is possible as described here: https://github.com/Shazwazza/ClientDependency/wiki/Html-Attributes
As far as I can tell this is only useful when you're linking to a resource that you link to on a CDN or a server that you don't control? The thought being: if this resource has been tampered with the integrity check will fail and the script will not load. I haven't heard of this being useful for scripts you load from your own webserver though, so CDF doesn't generate anything for that. Maybe I'm missing something though?
That's what I'm looking for - I've been performing tests by using the CDF to reduce the number of calls made on load, it seems to work so I was looking to flesh it out fully and perform some comparisons.
You're likely correct and I'm likely wrong; but as with all things Umbraco, I find it best to learn by trying! :)
Thanks!
/Chris
is working on a reply...