【防止frame嵌套】

if (top.location != self.location) {
top.location = self.location;
}
var str = document.URL;
str = str.toLowerCase();

Clickjacking简单介绍 – 瞌睡龙

Break Out of iframe

js如何判斷是否在iframe中及防止網頁被別站用 iframe嵌套

 

【設定網頁為no-cache】

response.setHeader(“pragma”, “no-cache”);
response.setHeader(“cache-control”, “no-cache”);
response.setDateHeader(“expires”, 0);

請問 jsp 如何設定網頁成 no-cache

JSP缓存的三个问题分析