Hi,

I am currently working on a tool with very challenging requirements and I hope someone can help me finding a way to do this.

The tool should be a HTML5 web application consisting of a few HTML pages with mainly text and links to some DOC and PDF files, which are also located in the application / the folder.

One requirement is that it should run in every user's browser locally, with all files saved on his/her device, not on a web server, to make sure the user can also use it outside the company's network (if it would be hosted on a web server that one would be only accessible inside the company's network) and completely offline.

Since the tools content changes from time to time, there should be a webserver providing the newest version of the content HTML files and DOCs and PDFs and the tool should check, when it is used online and in the corporate network, if there are newer documents on the server, and in that case update its own local documents (replace them). It has to store them on the user's local hard disk, so the user can still use them when he is offline.

Is it possible to build such a tool using HTML/CSS/JavaScipt for the local part only? I have a lot of things where I am not sure if it works:
Can I download the files from the web server via JavaScipt using AJAX?
Is it possible to load PDFs and DOCs via AJAX?
Is there a way to solve the same-origin-policy-issue when using AJAX to access a web server from locally?
If the new files are loaded successfully, can they be stored on the user's filesystem?
Or, would it be possible to store complete files using HTML5's new storage features?

Even if it is possible somehow, it would be way beyond the intended use of the technologies I mentioned. So if anyone knows a better way to this with other technologies, please let me know.

Regards,
John