Home  >  Q&A  >  body text

Why do so many websites keep requesting an empty gif? Is it to get data while avoiding cross-domain?

Like the title? Thanks!

黄舟黄舟2670 days ago736

reply all(4)I'll reply

  • 为情所困

    为情所困2017-06-28 09:30:25

    Mostly for site statistics

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-28 09:30:25

    First of all, it is natural to avoid cross-domain. Usually third-party monitoring platforms are not in the same domain as the website; secondly, using blank gif or 1x1 px img is a common method for Internet advertising or website monitoring. It is simple and safe. This kind of request is used in many places, such as browsing, clicks, hotspots, heartbeats, ID issuance, etc.

    I have done this before, haha.

    reply
    0
  • PHP中文网

    PHP中文网2017-06-28 09:30:25

    Check if there are any parameters on the url? It should be used for burying questions, such as recording what buttons you clicked, what operations you performed, etc.

    reply
    0
  • 滿天的星座

    滿天的星座2017-06-28 09:30:25

    I don’t know if you are looking at some statistical scripts, such as google-analytics.js

    These are scripts embedded in third parties to collect some front-end statistical information and save them on the third-party server. Then you can log in to their management backend to view the statistics.

    So this must be cross-domain, so we are indeed avoiding cross-domain

    reply
    0
  • Cancelreply