Is it possible to load in a local version of a JavaScript file instead of the server version?

前端 未结 5 937
醉梦人生
醉梦人生 2021-02-08 04:59

Just had a quick question to throw out and see if there was a solution for this...

Let\'s pretend I have no access to the server. I load up a webpage and find out that t

5条回答
  •  半阙折子戏
    2021-02-08 05:13

    If you want a way to use a local file instead of a remote file (in any web browser), I highly recommend Charles Web Proxy. http://www.charlesproxy.com/

    In Charles, go to the Tools menu and select Map Local. Add a new mapping by entering the address of the file on the web you would like loaded from your disk.

    Edit Mapping Example

    This technique will for all sorts of files (JavaScript, CSS, SWF). Of course you have the option to temporarily disable this feature, and it will only work while Charles is running. Very handy.

提交回复
热议问题