relative to the root. It was missing the initial forward slash,
As a result it refers to a file at the same node as the file
the reference occurs in.
Resources with URLs that do not specify the root will not be loaded if the user visits a subpage directly.
An easy mistake to make, but less easy to discover due to the
modern web application and browser landscape.
Some modern web applications consist of a single page. This type
of application is referred to as a
Single Page Application, SPA
Other applications may have a single page where the user lands, the main page of the application.
has been omitted,
as the URL for the page will be equal to the web application root.
In a stand-alone web application this may never be a problem. However, many modern applications integrate with other applications. Software vendors may provide one main application and several other linked applications for added value. Even a small business is likely to use a series of interconnected tools.
Please always use root relative URLs to avoid this type of issue. To make this more easy to do we can stop putting slashes at the start and end of variables, and always put them between the variable names. This practice also makes the code more easy to read because we never have to asks ourselves if the slashes are correct; we see them immediately.
The surprising part is that the failure situation does not occur in other browsers because they retrieve the correct file from the cache even though technically a wrong file is referenced. In my opinion Internet Explorer 11 shows the correct behavior. The other browsers make it impossible to reliably use the same JS file name in nested directories.
Due to the fact that Microsoft product support dates are linked to Operating System support dates , Internet Explorer 11 will be supported until September 2029 in some situations . An example is the Windows 10 Enterprise 2019 Long Term Servicing Channel.