meta详细解读
meta是HTML的元標簽,包括了對應的HTML相關信息,客戶端瀏覽器和服務端的陳序會根據這些信息來進行處理。
http-equive類似于http頭部的協議,它回應瀏覽器一些重要的信息,以幫助正確精確的顯示網頁內容。
content(內容)這個網頁的格式的文本的,網頁模式。
charset(編碼)——這個網頁編碼utf-8中文編碼,這個是網頁內容的編碼,而不是文件本身。其他中文的編碼可能會亂碼。
meta標簽的http-equive屬性語法格式:<meta http-equive="參數" content="變量值"/>
http-equive參數有以下幾種參數;
1,content-type(顯示字符集)
<meta http-equive="content-type" content=""/>------設定頁面使用的是字符集
2, cache-control(頭域)
<meta http-equive="cache-control" content="no-cache"/>-------清除緩存(訪問這個網站需要再次下載)
cache-control:指請求和響應遵循的緩存機制,不能被共享緩存處理,允許服務器描述用戶的部分響應信息,此響應消息對其他用戶響應無效。
緩存指令包括:no-cache、?no-store、max-age、max-stale、min-fresh、only-if-cached
3、Expires content=0
<meta http-equive="Expires" content="0"/>----------設定網頁到期時間
4、pragma content=no-cahce
<meta http-equive="pragme" content="no-cache"/>-------用于禁止瀏覽器在本地機的緩存中調閱網頁內容,但設定后一旦從網頁離開就無法從cache中調出。
5、Refresh ?content=2
<meta http-equive="Refresh" content="2"/>------自動刷新并指向新頁面。
6、Cache-control ?content=store
<meta http-equive="cache-control" content="store"/>--------強制緩存在任何情況下都不要保存任何副本。
7、Pics-label
<meta http-equive="Pics-label" content=""/>--------網頁等于評價
8、keywords(關鍵字)
<meta http-equive="keywords" content="1,2,3,"/>---------關鍵字,搜索引擎用的。
轉載于:https://www.cnblogs.com/xback/p/6858555.html
總結
- 上一篇: TensorFlow------学习篇
- 下一篇: (初学者)安装hadoop集群注意事项