Optimize Java Script

Impact area

Manageability

Severity

Medium

Impact

The  <apex:includeScript> tag places JavaScript right before the closing </head> element, causing the browser to attempt to load the JavaScript before rendering any other content on the page. This may have unintended consequences and/or cause slower page loads.

Remediation

Use the standard HTML <script> tag instead of <apex:includeScript>.

References

See the Salesforce documentation article: Optimizing JavaScript.

What's here


Related content

Apex Component rules




Last modified on Mar 31, 2020