Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Wilson 100 posts 377 karma points
    Oct 03, 2016 @ 09:07
    Chris Wilson
    0

    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

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Oct 03, 2016 @ 15:17
    Sebastiaan Janssen
    100

    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?

  • Chris Wilson 100 posts 377 karma points
    Oct 04, 2016 @ 09:01
    Chris Wilson
    0

    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

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies