I have a js web app, I want it to read a given file, without selecting from a form or anything similar, the file name is known to the app.
In old browsers it was possible to do:
var client = new XMLHttpRequest();
client.open('GET', '/foo.txt');
client.onreadystatechange = function() {
alert(client.responseText);
}
client.send();
But now Chrome doesn't permit that, saying: Not allowed to load local resource.
Is there a way to accomplish it?