Is there a way in JavaScript to get the contents of a linked file without making a second GET request? That is, if I have
<link rel="foo" href="bar.txt">
the browser should automatically download bar.txt
. Is there any way to read its contents without getting it again (i.e. via jQuery's $.get
or similar)?
Edit
I could use a second GET request and as mentioned in the comments there likely wouldn't be a performance hit, but this question is mainly a thought experiment: it seems like it'd be pretty standard functionality, but more and more things point to this not being possible. Is there a reason why?