henrykorir
henrykorir

Reputation: 117

Replacing Javascript source file from server with local javascript source

How do you replace a Javascript source file from server with a local javascript source file using javascript code locally without using plugins? For example: You visit a site like www.example.com and you view source. In the source you find this <script src="https://www.example.com/myscript.js?val=11111er1"></script> . How would you replace it with something like <script src="C:/scripts/mynewscript.js?val=11111er1"><script>so that the site uses "mynewscript.js" in C drive instead of "myscript.js" from server?

Upvotes: 1

Views: 460

Answers (1)

user5066707
user5066707

Reputation:

You can't because the browser doesn't allows you to use computer files. While your website directory is into the drive you can use files in the same directory.

Upvotes: 1

Related Questions