fanzeyi

豆瓣似乎用了什么代码去应对ISP提供商嵌入的广告

  •  
  •   fanzeyi · Mar 27, 2011 · 4762 views
    This topic created in 5601 days ago, the information mentioned may be changed or developed.
    前几天上豆瓣发现有联通嵌入的广告
    结果居然自动刷新了
    貌似有什么反iframe的代码在里面。。
    2 replies    1970-01-01 08:00:00 +08:00
    phzzy
        1
    phzzy  
       Mar 27, 2011
    判断是否是被嵌入了iframe,如果是的话,top.location = window.location
    这个可以防止被isp嵌入个广告
    fanzeyi
        2
    fanzeyi  
    OP
       Mar 27, 2011
    @phzzy 好吧 重点不是代码……
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3321 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 10:54 · PVG 18:54 · LAX 03:54 · JFK 06:54
    ♥ Do have faith in what you're doing.