A fellow techie asked me today if jQuery (or JavaScript in general) could ping back to its source of origin and get information about the filesystem without the use of executable code. My knee jerk answer was that there would be no way that IIS would allow this to happen without the use of AJAX, ASP.NET or some other executable technology. In other way of putting it, no way that JavaScript running from a static HTML page could pull back information about the webserver it came from.
Again, this was the knee jerk answer, just due to security concerns, this would not be possible... but I do not claim to be an all knowing JavaScript/jQuery expert, so I put this out to all of you. If you know of a way this can be done or if you know for certain that it cannot be done, either way I appreciate your feedback.
Thank you.
-Jessy Houle
With the solutions thus far, they all require server side technologies, either ASP, ASP.NET, PHP, Web Services, etc. To better illustrate the problem, I'll give you the exact scenario.
There is a group of 10 HTML files, all static with only HTML/CSS/JavaScript sitting on a website on an IIS webserver. ASP, ASP.NET, PHP, and all other server side technologies are not allowed. These 10 HTML files have names that change and sizes that change, etc. The issue that needs to be solved is to display information about the files that are in that directory at that point and time (without directory browsing enabled, I'll add).
- REQUEST fileinfo.html from IIS
- Browser contains fileinfo.html
- fileinfo.html has JavaScript/jQuery that calls back out to IIS to get file and size information
- IIS reports back to the JavaScript/jQuery information about the files
I don't think step 3 is possible without the use of some sort of server side technology. BUT, I just want to make sure there isn't a new hack I've heard about.