Question

Using Google Chrome (Chromium), is it possible to watch/see $.getScript() loading external scripts into your webpage?

Basically, I am dynamically loading many scripts into my webpage based on user preference, and it's causing an issue, I want to check if a particular script is getting inserted or not, and if it is getting inserted, I want to know if it is getting inserted once, or more than once.

Was it helpful?

Solution

You can see them in the Network tab of the developer console. Press F12 and go to the Network tab and you'll see all the resources loaded on that page. (You'll need to refresh once you open it.)

OTHER TIPS

I agree... it's a fail...

In firefox, you can search any declaration with !textToSearch and it will be searched in hidden files loaded by $.getScript() too. This way

In Chrome it don't works... but you can add a Workspace folder and link it to your source. Just right-clicking in server (in sources tab) and "Add folder to workspace"

Using Google Chrome, is it possible to watch/see $.getScript() loading external scripts into your webpage?

Yes, as has been said, you press F12 to access the Developer console and go the the Network Tab.

The files which are inside the red rectangle were loaded with $.getScript()

Network tab in Chrome

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top