Why use [removed]?

后端 未结 9 1142
孤街浪徒
孤街浪徒 2021-01-01 16:34

I was wondering why ad\'s still use the document.write approach to inserting the add into the page



        
相关标签:
9条回答
  • 2021-01-01 16:57

    I stand corrected, doc.write created scripts are blocking - worse than I though heh :) - but as an adblock avoider it's really weak, so I can only conclude it's an SOP mechanism for dynamically adding params to a script request overused.

    Use the DOM insertion technique when avoiding script blocks kids.

    0 讨论(0)
  • 2021-01-01 16:57

    I don't know for certain, but they might use it so all the content on the website is loaded and shown to the user first, then the ads are loaded and shown.

    0 讨论(0)
  • 2021-01-01 16:59

    A traditional script tag will block the page while it is loading and executing. A script loaded with document.write will work asynchronously. That's why you see this on ads or analytics, as such scripts don't influence the page content directly.

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