Why you should care
Including JavaScript files in HTML is not ideal as some browsers cannot read an external Javascript file and usually renders it completely blank. It usually requires importing a Jquery. Having Javascript files be unreadable in HTML can cause reliability issues.
Business Impacts
It is recommended to avoid JavaScript in HTML as it cannot be accessed by browsers making the code unreadable, inaccessible and unproductive. It can also be a waste of resources if the code is designed to be accessed as a website.
CAST Recommendations
References
https://stackoverflow.com/questions/17505563/javascript-file-not-working-when-linked-from-html
How we detect
For JSP: create a link (html tag) instead of an include. It will be stored in the client cache instead of being sent each time the page is loaded
About CAST and Highlight’s Code Insights
Over the last 25 years, CAST has leveraged unique knowledge on software quality measurement by analyzing thousands of applications and billions of lines of code. Based on this experience and community standards on programming best practices, Highlight implements hundreds of code insights across 15+ technologies to calculate health factors of a software.