Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out the source of a request (in chrome dev tools)?

I have a weird network request in my page, which refers to JavaScript files, which I removed from every html file earlier. Cache is cleared and there is no single reference to be found in the source html and the JavaScript files. For fixing that and also out of general curiosity I would like to know if there is a simple way to find out where a request was triggered, preferably using the chrome-devtools.

Update: Thanks to jaredwilli I found the initator column under the network-tab. However this only shows Other. What I would like to know, is the (html or javascript) file where those Requests have been triggered.

like image 550
hugo der hungrige Avatar asked Apr 10 '14 17:04

hugo der hungrige


People also ask

What is Sources tab in dev tools?

The Sources panel gives us the ability to perform a lot of operations on the browser, some of which are: Editing and running CSS and JS files on the fly. Creating, saving and running code snippets. Persisting changes across page reloads.

How do you search for a source in inspect element?

Yeah, if you want to search within content sources which are scripts used by extensions and the internal browser API, you enable it in the Settings of DevTools and then from any panel in DevTools you can type Ctrl + Shift + F or (on Mac) Options + Command + F (⌥⌘F) to search across all sources, snippets, and files.


1 Answers

On the Network panel, you can determine what the initiator of a request was by viewing the Initiator column. It gives you the file, line number and type of resource it was, either Script or something else.

like image 100
jaredwilli Avatar answered Sep 20 '22 07:09

jaredwilli