I know that its possible to reference third party JavaScript files on the web like so:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
Is it possible to reference javaScript file on my local machine by doing something like this?
<script src="file:///C:/folder/custom_javascript.js" type="text/javascript"></script>
I suspect this may be a no-no, since it could be a way for websites to find out what files are on a client's computer...
The reason I would like to do this is because I am developing a javaScript-heavy application on google app engine. I'd like to be able to run and debug revisions to my javaScript files without having to re-upload them every time I make a change. Currently, every time I change something in the javascript, I have to:
<script src="resource/custom/js/the_file_im_working_with.js?revision=76" type="text/javascript"></script>
https://my_app.appspot.com/index.html?revision=26
The result of all this is my concentration being broken and wasted time.
I tried playing around with caching options in the HTML headers and in the browser itself, but I think the files may be being cached by a server somewhere between google and my computer.
Any input or ideas would be much appreciated!
No, you cannot reference a local file from a non-local file. The closest workaround would be to set up a local server on your machine and link to localhost
:
<script src="http://localhost/script.js"></script>