如何保護你的網頁,不被搜尋引擎收錄?
如果你真的要把私人網頁放在網路上,也不打算用密碼做保護的話,你可以在想要保護的那些網頁的 head 裡,加上:
|!– 告訴搜尋引擎不要對此網頁做索引,也就是說不會出現在它的搜尋結果中 –|
|META NAME="robots” CONTENT="noindex"|
|!– 告訴搜尋引擎不可以去處理網頁裡的超連結 –|
|META NAME="robots” CONTENT="nofollow"|
|!– 告訴搜尋引擎不可以把這個網頁儲存在他們的 server 裡,也就是沒有 [頁庫存檔] –|
|META NAME="robots” CONTENT="noarchive"|
另外,還有一個保護整個目錄不被收錄的方法。你必須在網站的根目錄下 (/) 建一個名為 robots.txt 的文字檔,檔案內容如下:
# This is a comment line
User-agent: lycra
Disallow: /
User-agent: *
Disallow: /tmp
Disallow: /logs
User agent 代表搜尋引擎的 robot,用 ‘*’ 代表所有的搜尋引擎 robot,緊接在 User-agent 之後
若干個 Disallow 代表拒絕該 robot 收錄的目錄,如果拒絕的目錄是 ‘/’ 的話,則代為整個網站都是謝絕收錄的。
你可以依照自己的目錄配置情況來做調整。
function myclass()
{
this.name = "onnie" ;
this.birtyday = "19001203";
this.obj1 ;
this.obj2 ;
this.obj3 ;
this.printname = function callme()
{
alert(this.name);
alert(this.birtyday);
alert(this.obj1.value)
alert(this.obj2.value)
alert(this.obj3.value)
}
}
function checkname(t)
{
if (t.obj1.value == "" )
{
alert("請檢查dd!!");
}
if (t.obj2.value == "" )
{
alert("請檢查ss!!");
}
if (t.obj3.value == "" )
{
alert("請檢查ff!!");
}
}
========================
function doit()
{
var t1 = new myclass ;
t1.name = "haha";
t1.obj1 = document.form1.dd ;
t1.obj2 = document.form1.ss ;
t1.obj3 = document.form1.ff ;
//t1.printname();
checkname(t1);
}
{
this.name = "onnie" ;
this.birtyday = "19001203";
this.obj1 ;
this.obj2 ;
this.obj3 ;
this.printname = function callme()
{
alert(this.name);
alert(this.birtyday);
alert(this.obj1.value)
alert(this.obj2.value)
alert(this.obj3.value)
}
}
function checkname(t)
{
if (t.obj1.value == "" )
{
alert("請檢查dd!!");
}
if (t.obj2.value == "" )
{
alert("請檢查ss!!");
}
if (t.obj3.value == "" )
{
alert("請檢查ff!!");
}
}
========================
function doit()
{
var t1 = new myclass ;
t1.name = "haha";
t1.obj1 = document.form1.dd ;
t1.obj2 = document.form1.ss ;
t1.obj3 = document.form1.ff ;
//t1.printname();
checkname(t1);
}
[其它][網頁瀏灠]FireFox與中文URL
分類: — lss @ 10:33 (35 次)
當URL有中文的時候,在IE(5.5以上試過)裡面可以正常顯示在網址列,但是在FireFox裡會被編碼成%xx的模樣。
例如,在pLog的資料夾裡面查看中文檔名的圖檔時,就會看到%xx的網址出現。
解決方法,調整FireFox的設定:
- 在FireFox的網址列輸入about:config。
- 在filter列輸入network.standard-url.escape-utf8。
- 將network.standard-url.escape-utf8設定值由預設true的改成false。
這樣就行了。
資料來源:Mozilla@Taiwan論壇之「Mozilla Links - 國際特刊號 」。
訂閱:
文章 (Atom)