Is it possible to load a JavaScript file with http://localhost as the source?
ex:
<script type="text/javascript" src="http://localhost:8081/signalr/hubs" language="javascript"></script>
I am using a script like this in my asp.net web application. It is working properly when running locally on my computer.
Once I put the web application onto a live server and I access the page that has the above script, the GET for that script returns status “aborted”. Is it possible to use this reference when accessing the website externally?
Note*: http://localhost:8081/signalr/hubs has a javascript script called Hubs.js. Navigating to it from a browser on the server displays the script.
localhostmeans the current computer.It only means your server if the browser is on the same computer as the server.