fanzeyi

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

  •  
  •   fanzeyi · Mar 27, 2011 · 4853 views
    This topic created in 5669 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   ·   Privacy   ·   Solana   ·   2630 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 00:04 · PVG 08:04 · LAX 17:04 · JFK 20:04
    ♥ Do have faith in what you're doing.