# External script performance

**URL:** <https://forum.readymag.com/t/external-script-performance/1228>\
**Category:** Custom code\
**Created:** [February 16, 2023, 9:07pm UTC](https://forum.readymag.com/t/external-script-performance/1228 "2023-02-16T21:07:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon\_Abrams](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.readymag.com/simon_abrams/32/846_2.png) [@Simon\_Abrams](https://forum.readymag.com/u/Simon_Abrams)\
**Post date:** [February 16, 2023, 9:07pm UTC](https://forum.readymag.com/t/external-script-performance/1228/1 "2023-02-16T21:07:53Z")

</div>

We’re using an external script (Plotly.js) to display several graphs on our site. Everything works fine, but each chart is loading a separate instance of Plotly, and is therefore causing a little bit of a performance hit. Is there any way to load the script once or force it to be cached somehow?

---

<div class="post-metadata">

**Author:** ![neueMeta](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.readymag.com/neuemeta/32/92_2.png) [@neueMeta](https://forum.readymag.com/u/neueMeta)\
**Post date:** [February 17, 2023, 8:30am UTC](https://forum.readymag.com/t/external-script-performance/1228/2 "2023-02-17T08:30:49Z")

</div>

if you load the plotly script in the section the script will only be loaded once.  
if you load it in every custom widget it gets loaded several times.

without any information on how you have implemented it there is no chance on giving you datailed advice
