1

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?

3

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.