Possible to prevent our website from running inside another domain's frameset or IFrame?

后端 未结 4 620
醉梦人生
醉梦人生 2021-02-09 17:05

We\'ve been having an problem recently where other sites are running our e-commerce site inside a frameset where our site (with the offenders affiliate id tacked on) is the only

4条回答
  •  南笙
    南笙 (楼主)
    2021-02-09 17:30

    I've heard of solutions to this problem being referred to as a "frame popper script". A quick google comes up with this thread. Looks like this is one of the simplest:

    if (window != top) top.location.href = location.href; 
    

提交回复
热议问题