In this article I will talk about how to avoid loading the same JavaScript files multiple times for component-based web frameworks like JSF, Wicket, etc. For example, when you have a JSF composite component and it contains a link to an external JS file, including this composite component multiple times to XHTML will lead to multiple links to same external JS file.
Including the same JS for multiple times in an HTML document can be the reason for weird JS behaviors like running the same code multiple times.
In this article I will talk about how to avoid loading the same JavaScript files multiple times for component-based web frameworks like JSF, Wicket, etc. For example, when you have a JSF composite component and it contains a link to an external JS file, including this composite component multiple times to XHTML will lead to multiple links to same external JS file.
Including the same JS for multiple times in an HTML document can be the reason for weird JS behaviors like running the same code multiple times. […]