Skip to content Skip to sidebar Skip to footer

Access Remote JQuery File

I am building a website (to be accessed by only 3 members). I need to install jQuery in that website. Since, it is a website with very limited members, I decided to have the jQuery

Solution 1:

First of all, there is no such way by which you can access a user's local file. This will be a huge security exception. There is only one way by which you can access a user's file, i.e. when the user uploads the files voluntarily.


Now, offering you a solution, if you have only 3-4 members and they are not variable, then you must try using a local server. Why access the web pages online when you can access them offline?

Using a local server may save you bandwith as well as pages will load immensely fast. And then YES you can store the jquery file in your project folder which is in the local machine.


For starters, WAMP SERVER and XAMPP SERVER can prove to be a boon. They are included with mysql, php and administrating features. This must be exactly what you are looking for.
Furthur comments : If the users are connected with LAN (which I guess in your case), you can install WAMP or XAMPP in only one machine and access it using the I.P. address of the server machine. For eg -> 192.168.1.2/YOUR_APP/ and access it in the server machine as localhost/YOUR_APP

Solution 2:

<!DOCTYPE html>
<html>
<script src="file:///C:/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $('body').html('Replaced text');
});
</script>
<body>

Replace this text
</body>
</html>

Solution 3:

Don't think you can access the file this way

<script src="file:///C:/jquery.min.js"></script>

try to get from other web resource

<script src="jquery.min.js"></script> or as

<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>

and another thing, in your code at line 7 and 8 why are there two }); ending brackets.


Post a Comment for "Access Remote JQuery File"