What is “initiator other” in network in chrome console?

前端 未结 2 1544
暗喜
暗喜 2021-02-04 23:44

I fire an image tag when someone converts on our website for reporting and analytics:



        
相关标签:
2条回答
  • 2021-02-05 00:34

    I noticed another case not related with a user action:

    <link rel="icon" type="image/jpeg" href="image.jpg" />
    

    ... causes the image.jpg to get loaded with "Initiator Other" (also true with images of another format).

    (wanted to add this as a comment under the previous answer, but I am not allowed to)

    0 讨论(0)
  • 2021-02-05 00:41

    "Initiator Other" usually means the network request was made from a user, not from Chrome, a redirect or a script.

    The request was fired when someone clicked a button (this is what your analytics is probably tracking). You can read more about this in the Chrome DevTools docs.

    Initiator: The object or process that initiated the request. It can have one of the following values:

    1. Parser - Chrome's HTML parser initiated the request.

    2. Redirect - A HTTP redirect initiated the request.

    3. Script - A script initiated the request.

    4. Other - Some other process or action initiated the request, such as the user navigating to a page via a link, or by entering a URL in the address bar.

    The requests are made in the order you see, the first received the 302 response which said, "hey, go to this new url". That's (probably) why the second request was made, which got the 200. The third was probably from clicking on the button too. Looks fine to me.

    0 讨论(0)
提交回复
热议问题