Title: JavaScript file in every webpage
Last modified: November 3, 2023

---

# JavaScript file in every webpage

 *  Resolved [lenasterg](https://wordpress.org/support/users/lenasterg/)
 * (@lenasterg)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/javascript-file-in-every-webpage/)
 * Hi, thanks for the great plugin and the continous support and update.
 * I noticed that the ics-calendar-js-extra.js file gets loaded in every webpage,
   regardless if there is a ics-calendar shortcode or not. 
   I think it would be 
   better for webpage speed to load it only where there is a shortcode. I don’t 
   know to do it, but I found a post which I think it describes how to do it: [https://www.wpexplorer.com/load-scripts-shortcode/#:~:text=How%20to%20Load%20Your%20Script,function%20inside%20your%20add_shortcode%20function.](https://www.wpexplorer.com/load-scripts-shortcode/#:~:text=How%20to%20Load%20Your%20Script,function%20inside%20your%20add_shortcode%20function.)
 * Thanks again,
   Lena

Viewing 1 replies (of 1 total)

 *  Plugin Author [Room 34 Creative Services, LLC](https://wordpress.org/support/users/room34/)
 * (@room34)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/javascript-file-in-every-webpage/#post-17172751)
 * Unfortunately I attempted to apply this change in a previous version and there
   were issues. I am still looking at ways to optimize for this situation. However
   since browsers typically cache static assets like images and JavaScript files,
   the performance impact of including this file is overblown, especially by tools
   like PageSpeed Insights.

Viewing 1 replies (of 1 total)

The topic ‘JavaScript file in every webpage’ is closed to new replies.

 * ![](https://ps.w.org/ics-calendar/assets/icon.svg?rev=3427980)
 * [ICS Calendar](https://wordpress.org/plugins/ics-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ics-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ics-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/ics-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ics-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ics-calendar/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Room 34 Creative Services, LLC](https://wordpress.org/support/users/room34/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/javascript-file-in-every-webpage/#post-17172751)
 * Status: resolved