I'm kind of new to web technologies, but this has been something that always confused me.
If I have an html file with a javascript file and text file in the same directory, why can't I just open the html file in my web browser (C:\somepath\index.html) and read the text file with a GET request from the javascript file?
If I put throw those files on a web server (such as tomcat), it suddenly works. Why is that?
I know you can read local files with HTML5, but I am curious why you couldn't before.
Sorry, if I'm using incorrect terminology.