Contains one or more single point of failure
This means that the URL in question has one or more single point of failure.
Why is this important?
If you load 3rd party JavaScript, CSS or fonts synchronously inside the HTML <head>, these files could fail to load and stop the entire page from loading. Essentially, single point of failure (SPOF) presents a risk that can take the entire site down, and it is a very strong 'best practice' recommendation to avoid such risks.
For instance, if you are utilizing external scripts, fonts, or styles, and they don’t load properly, what effect would that failure have on the rest of the page? If it would keep the page from rendering or functioning, that external file is a SPOF.
What does the Hint check?
This Hint will trigger for any internal URL which loads in external JavaScript, CSS or fonts synchronously in the <head>.
Examples that trigger this Hint:
The Hint would trigger for any URL with, for example, external JavaScript in the <head>:
How do you resolve this issue?
SPOF occurs due to the dependence on external scripts, so as a first step it makes sense to audit all third-party dependencies and understand if they all actually need to be used in the first place.
Following on from there, it is a case of working through methods to stop external scripts from potentially blocking rendering:
- Always load third-party external scripts asynchronously in a non-blocking pattern.
- Load application JS in a non-blocking pattern or towards the end of the page.
- Attempt to inline the @font-face style; ensure that the font files are compressed and cacheable.
- Ensure that the font files are compressed, cached, and small in size.
- Ensure that inlined @font-face styles are not preceded by a SCRIPT tag (which causes SPOFs in Internet Explorer).