List javascript urls of a page

Tags: , ,

is there a way I can extract the list of all the JS imported in a page, maybe via browser console? I’m not looking for only the ones imported via , but also the ones imported by other js scripts.

So, let’s say I have a page that is using requirejs, and during the usage of the page, many other JS files are loaded. How can I list these files imported URL?


You follow this code and get all URLs in urlsArray variables

like this output image. result array

var urlsArray = [];

[] document.querySelectorAll("script[src]"), function( src ) { 

Thanks [sayed021]

Source: stackoverflow