Why are jQuery source view pages not allowed as hyper-links on Stack Overflow?
Is it for browser compatibility concerns? Or is it perhaps for the same reason Stack Overflow disallows links to jsFiddle without code in the post?
Why are jQuery source view pages not allowed as hyper-links on Stack Overflow?
Is it for browser compatibility concerns? Or is it perhaps for the same reason Stack Overflow disallows links to jsFiddle without code in the post?
It has nothing to do with jQuery source links. This:
http://view-source:http://code.jquery.com/ui/1.11.1/jquery-ui.js
is not a valid URL, which is what the script is actually complaining about.
To actually view the source, you would use solely the view-source
browser scheme, like so:
view-source:code.jquery.com/ui/1.11.1/jquery-ui.js
That URI scheme is not allowed on the network and will not even render as a link when used (only plain text). There's really no reason to allow it, as there's rarely ever a circumstance wherein it's actually useful to reference a live file somewhere on the web and point to a line number. In fact, I'm not entirely convinced it's even useful here. It'd probably be far better off to just extract a small section out of that file which contains the line you're referencing.
view-source:http://code.jquery.com/ui/1.11.1/jquery-ui.js
. Yes, there's (effectively) a double scheme, because to view the source, the browser needs to know the scheme (http
) of the original URI.
Oct 12, 2014 at 12:25
[text](view-source:{url})
doesn't work. I tried to share the page source links many times while answering web-scraping questions.
Apr 17, 2018 at 4:51