We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Mar 14, 2021 11:43 AM
I am starting to host most of my scripts on my local web server. Are there any issues with storing the .js script myself?
Any best-practices or how-tos or is it as easy as creating the below .js file at /scripts/555555.js and referencing it in the code?
<!-- Start of HubSpot Embed Code -->
<script type="text/javascript" id="hs-script-loader" async defer src="js/5555555.js"></script>
<!-- End of HubSpot Embed Code -->
Solved! Go to Solution.
Mar 18, 2021 1:19 PM
@chrisati should have no problems with hosting it locally. Just download it and reference the local one instead of the hubspot hosted one. One thing I'd recommend is use something to download the file every once in a while in case it gets changed to keep them in sync. You could do that with PHP or Node or what have you. You could also just setup a notification service to send you a notifcation when the online file is updated and manually change it at that time.
Mar 18, 2021 10:31 AM - edited Mar 18, 2021 10:33 AM
Hi @chrisati
Thank you for reaching out!
I want to tag an expert on this - @stefen do you have any suggestions for @chrisati on this?
Thank you!
Best
Tiphaine
![]() | Saviez vous que la Communauté est disponible en français? Rejoignez les discussions francophones en changeant votre langue dans les paramètres ! Did you know that the Community is available in other languages? Join regional conversations by changing your language settings ! |
Mar 18, 2021 1:19 PM
@chrisati should have no problems with hosting it locally. Just download it and reference the local one instead of the hubspot hosted one. One thing I'd recommend is use something to download the file every once in a while in case it gets changed to keep them in sync. You could do that with PHP or Node or what have you. You could also just setup a notification service to send you a notifcation when the online file is updated and manually change it at that time.