; the http-equiv attribute mainly has the following parameters"/> ; the http-equiv attribute mainly has the following parameters">
Home > Article > Web Front-end > An example introduction to the Meta http-equiv attribute in htni
http-equiv, as the name suggests, is equivalent to the file header function of http. It can return some useful information to the browser to help display the web page content correctly and accurately. The corresponding attribute value is content, and the content in content is actually It is the variable value of each parameter. The http-equiv attribute syntax format of
1 , Expires(period)
Description: Can be used to set the expiration time of the web page. Once a web page expires, it must be retransmitted to the server.
Usage:
<meta http-equiv="expires" contect="Wed, 20 Jun 2017 22:33:00 GMT">
Note: GMT time format must be used.
2. Pragma (cache mode)
Description: It is used to set the browser to prevent the browser from accessing the page content from the cache of the local machine. After setting, once you leave the web page, you cannot retrieve it from the cache.
Usage:
<meta http-equiv="Pragma" contect="no-cache">
Note: With this setting, visitors will not be able to browse offline.
3. Refresh
Description: Automatically refresh and point to the new page.
Usage:
<meta http-equiv="Refresh" contect="2;URL=">
Note: The 2 means that it will automatically refresh to the URL after staying for 2 seconds.
4. Set-Cookie (cookie setting)
Note: If the web page expires, the saved cookies will be deleted.
Usage:
<meta http-equiv="Set-Cookie" contect="cookievalue=xxx;expires=Wednesday, 20-Jun-2007 22:33:00 GMT; path=/">
Note: GMT time format must be used.
5. Window-target (display window setting)
Description: Force the page to be displayed as an independent page in the current window.
Usage:
<meta http-equiv="Window-target" contect="_top">
Note: Used to prevent others from calling your own page in the frame.
6. content-Type (display character set setting)
Description: Set the character set used by the page.
Usage:
<meta http-equiv="content-Type" contect="text/html; charset=gb2312">
7, Pics-label (webpage rating)
Usage:
<meta http-equiv="Pics-label" contect="">
Description: There is a content setting in IE’s internet options that can prevent browsing some affected Restricted websites, and the restriction level of the website is set through the meta attribute.
8, Page_Enter, Page_Exit
Set the special effects when entering the page
<meta http-equiv="Page-Enter" contect="revealTrans(duration=1.0,transtion= 12)">
Set the special effects when leaving the page
<meta http-equiv="Page-Exit" contect="revealTrans(duration=1.0,transtion= 12)">
The value of Duration is the dynamic transition of the web page Time in seconds.
Transition is the transition method, its value is 0 to 23, corresponding to 24 transition methods. As shown in the table below:
0 Box-shaped contraction 1 Box-shaped radiation
2 Circular shrinkage 3 Circular radiation
4 From bottom to top 5 From top to bottom
6 From left to right 7 From right to left
8 Vertical blinds 9 horizontal blinds
10 Horizontal lattice shutters 11 Vertical lattice shutters
12 Dissolve at will 13 Expand from the left and right ends to the middle
14 Expand from the middle to the left and right ends 15 Expand from the upper and lower ends to the middle
16 Expand from the middle to the upper and lower ends 17 Expand from the upper right corner to the lower left corner
18 Expand from the lower right corner to the upper left corner 19 Expand from the upper left corner to the lower right corner
20 Expand from the lower left corner to the upper right corner 21 Horizontal linear expansion
22 Vertical linear expansion 23 Randomly generate a transition method
9. Clear the cache (re-download when you visit this website again!)
<meta http-equiv="cache-control" content="no-cache">
10. Set the expiration time of the web page
<meta http-equiv="expires" content="0">
11. Keywords, give Used by search engines
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
12. Page description
<meta http-equiv="description" content="This is my page">
The above is the detailed content of An example introduction to the Meta http-equiv attribute in htni. For more information, please follow other related articles on the PHP Chinese website!