Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Bug] Base href is not being applied correctly to all links; initial letter of relative links truncated #2829
OS: Windows 8.1
The online scanner is not reading the base element href for some of the relative links in the head.
At https://thomasbrodhead.com, the base element is:
. . . and the favicon is:
But scanning https://thomasbrodhead.com, the online scanner concludes that the favicon is found at:
Notice that the scanner has dropped the "f" in "/favicons/", resulting in a 404, as the resource as stated does not exist.
This can be found in the link reported in the "no-http-redirects" hint that is triggered by the scanner's inability to find the resource.
When scanning a subdirectory of the site, it becomes apparent that the base href is not being read and applied correctly.
At https://thomasbrodhead.com/chromatic-geometry, the base href is still set with:
. . . and the favicon is indicated with:
But the scanner uses the URL, not the base href, for determining the location of the favicon, and concludes that it is:
When it rightly is located at
Notice the double-problem here: the scanner has used the URL (https://thomasbrodhead.com/chromatic-geometry/) as the base of the link, not the href supplied in the html (https://thomasbrodhead.com/"). But then it then appends "avicons/favicon.20190811163149.ico" to the URL href, not "favicons/..." with an initial "f"...i.e., it truncates the initial letter of the resource.
In my scanning, this was revealed in the "http-cache" hints section. This problem results in 404 errors that trigger other hints (when the resource can't be found and interrogated by the scanner, the 404 page of the site is returned, and webhint then reports errors on those responses, etc.)