http://ithelp.ithome.com.tw/question/10013447

一般HTML上的語法:
檢視原始檔複製到剪貼簿列印關於

1.
2.
3.
4.
5.
6.
7. # 其參數可以用這些方式設定:
8. #HTTP 1.1. Allowed values = PUBLIC | PRIVATE | NO-CACHE | NO-STORE.
9. #Public - may be cached in public shared caches
10. #Private - may only be cached in private cache
11. #no-Cache - may not be cached
12. #no-Store - may be cached but not archived
13.
14.







# 其參數可以用這些方式設定:
#HTTP 1.1. Allowed values = PUBLIC | PRIVATE | NO-CACHE | NO-STORE.
#Public - may be cached in public shared caches
#Private - may only be cached in private cache
#no-Cache - may not be cached
#no-Store - may be cached but not archived




在 perl 的 CGI 的寫法:
檢視原始檔複製到剪貼簿列印關於

1. print "Content-type: text/html\; charset=big5\n";
2. print "Pragma: no-cache\n";
3. print "expires: Mon, 22 Jul 2002 11:12:01 GMT\n\n";

print "Content-type: text/html\; charset=big5\n";
print "Pragma: no-cache\n";
print "expires: Mon, 22 Jul 2002 11:12:01 GMT\n\n";


要不要給 Google 或其他 Spider 抓的寫法:
檢視原始檔複製到剪貼簿列印關於

1.
2.
3.
4.
5. # 可用的參數:
6. #CONTENT="ALL | NONE | NOINDEX | INDEX| NOFOLLOW | FOLLOW | NOARCHIVE"
7. #default = empty = "ALL"
8. #"NONE" = "NOINDEX, NOFOLLOW"
9. #
10. #The CONTENT field is a comma separated list:
11. #INDEX: search engine robots should include this page.
12. #FOLLOW: robots should follow links from this page to other pages.
13. #NOINDEX: links can be explored, although the page is not indexed.
14. #NOFOLLOW: the page can be indexed, but no links are explored.
15. #NONE: robots can ignore the page.
16. #NOARCHIVE: Google uses this to prevent archiving of the page. See http://www.google.com/bot.html
17.





# 可用的參數:
#CONTENT="ALL | NONE | NOINDEX | INDEX| NOFOLLOW | FOLLOW | NOARCHIVE"
#default = empty = "ALL"
#"NONE" = "NOINDEX, NOFOLLOW"
#
#The CONTENT field is a comma separated list:
#INDEX: search engine robots should include this page.
#FOLLOW: robots should follow links from this page to other pages.
#NOINDEX: links can be explored, although the page is not indexed.
#NOFOLLOW: the page can be indexed, but no links are explored.
#NONE: robots can ignore the page.
#NOARCHIVE: Google uses this to prevent archiving of the page. See http://www.google.com/bot.html



最簡單是在網頁根目錄加上robots.txt防止任何Spider來抓。
檢視原始檔複製到剪貼簿列印關於

1. User-agent: *
2. Disallow: /

User-agent: *
Disallow: /

參考資料:http://www.i18nguy.com/markup/metatags.html

wrestle 發表在 痞客邦 PIXNET 留言(0) 人氣()