# Best Practice for Implementing SRI on Elfsight JavaScript Integration

**URL:** <https://community.elfsight.com/t/best-practice-for-implementing-sri-on-elfsight-javascript-integration/177492>\
**Category:** Customization\
**Tags:** linkedin-feed\
**Created:** [October 23, 2026, 7:48am UTC](https://community.elfsight.com/t/best-practice-for-implementing-sri-on-elfsight-javascript-integration/177492 "2026-10-23T07:48:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sudha\_Bisht](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/sudha_bisht/32/107815_2.png) [@Sudha\_Bisht](https://community.elfsight.com/u/Sudha_Bisht)\
**Post date:** [October 23, 2026, 7:48am UTC](https://community.elfsight.com/t/best-practice-for-implementing-sri-on-elfsight-javascript-integration/177492/1 "2026-10-23T07:48:26Z")

</div>

Hi Elfsight Community,

Thank you for great widget. Easy to integrate and understand. We have recently integrated the Elfsight LinkedIn Feed into our Drupal website.  
We were asked to implement Subresource Integrity (SRI) to verify the integrity of the third-party JavaScript loaded from the Elfsight CDN. We have added the SHA-384 integrity hash, but we understand that if the contents of `platform.js` change during an Elfsight update, the hash will need to be updated to prevent the browser from blocking the script.

How can we avoid this? Any recommendations or documentation would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [October 23, 2026, 9:52am UTC](https://community.elfsight.com/t/best-practice-for-implementing-sri-on-elfsight-javascript-integration/177492/3 "2026-10-23T09:52:46Z")

</div>

Hi there!

I am really happy that you enjoy the LinkedIn Feed widget. Thanks a lot for your kind words!

As for you question, the `platform.js` file is updated occasionally, so we don’t recommend using SRI. Any update would invalidate the hash and prevent the widget from loading.

To avoid this, we recommend removing the `integrity` attribute from the script tag.

Please let me know if this explains things or if you have any questions left 🙂

---

<div class="post-metadata">

**Author:** ![Sudha\_Bisht](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/sudha_bisht/32/107815_2.png) [@Sudha\_Bisht](https://community.elfsight.com/u/Sudha_Bisht)\
**Post date:** [October 23, 2026, 10:13am UTC](https://community.elfsight.com/t/best-practice-for-implementing-sri-on-elfsight-javascript-integration/177492/4 "2026-10-23T10:13:18Z")

</div>

Thanks Max for replying, We understand that the `platform.js` file is updated occasionally and that using SRI may cause the widget to stop working when the hash changes.

However, according to cybersecurity assessment requires us to address the risk associated with loading third-party JavaScript without integrity verification. So its mandatory for us to add integrity key.  
Would you recommend downloading the platform.js file and hosting it locally on our website, or is there another approach you would suggest?  
We also want to ensure that any solution we adopt complies with Elfsight’s guidelines and terms of use.

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [October 23, 2026, 11:51am UTC](https://community.elfsight.com/t/best-practice-for-implementing-sri-on-elfsight-javascript-integration/177492/5 "2026-10-23T11:51:06Z")

</div>

I completely understand your concerns regarding third-party script integrity and the need to comply with your organization’s security policies.

Unfortunately, we don’t recommend using SRI with `platform.js`, as the file is updated periodically, which would invalidate the integrity hash and prevent the widget from loading.

As for downloading and hosting `platform.js` locally, this is technically possible, but we don’t recommend this approach either. Future platform updates may cause the widget to stop working correctly, so you would need to maintain and update the locally hosted file yourself.

At the moment, we don’t have an alternative solution that would meet your SRI requirements while ensuring the widget continues to work reliably.

I’m sorry we couldn’t offer a better solution in this case. I’ll be happy to share your feedback with our team for future consideration.

Thank you for your understanding 🙏

---

<div class="post-metadata">

**Author:** ![Sudha\_Bisht](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/sudha_bisht/32/107815_2.png) [@Sudha\_Bisht](https://community.elfsight.com/u/Sudha_Bisht)\
**Post date:** [October 23, 2026, 1:13pm UTC](https://community.elfsight.com/t/best-practice-for-implementing-sri-on-elfsight-javascript-integration/177492/6 "2026-10-23T13:13:44Z")

</div>

Hello Max,  
One last question, Is there a way to retrieve LinkedIn feed data through an any API provided by Elfsight?

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [October 23, 2026, 1:21pm UTC](https://community.elfsight.com/t/best-practice-for-implementing-sri-on-elfsight-javascript-integration/177492/7 "2026-10-23T13:21:06Z")

</div>

We don’t provide an API for retrieving LinkedIn feed data.

Elfsight is a provider of ready-to-use widgets rather than a data provider, so our solutions are designed to display content through our widgets.
