view-source in href shows error in console view-source in href shows error in console google-chrome google-chrome

view-source in href shows error in console


Looks like Chrome and Firefox (at least) disabled this within the past year or so

I found this thread, and these release notes explaining why and provides a timeline as to when the change took place.


Related StackOverflow question: File URL "Not allowed to load local resource" in the Internet Browser


Chrome responds with the "Not allowed to load local resource:" as a security protocol. I'm not sure why this used to work, but not now, though there is no real way around this unless web-security is disabled. There may be a different outcome on other browsers, but ultimately you are correct in thinking that it's Chrome's security.


The reason is that Chrome tries to preload URLs in background, to speed up your browsing experience.