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

前端 未结 2 1542
暗喜
暗喜 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: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.

提交回复
热议问题