Reputation: 251
A quick question, I recently checked out the new html5 File api for javascript. See it here. Is it possible to use it to pull in a server side file without ajax? I know there's a File object in JavaScript, could I do a "new File("serverSideStuff.xml");" with that?
Upvotes: 0
Views: 205
Reputation: 9497
It is not possible because the user must be aware of what your are loading, and is the user who can tell you what you can load or not.
Upvotes: 0
Reputation: 4696
From the API description -
Using the File API added to the DOM in HTML5, it's now possible for web content to ask the user to select local files, then read the contents of those files.
So no, you can't select server side files
Upvotes: 1