Home >Backend Development >PHP Tutorial >Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial

Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial

WBOY
WBOYOriginal
2016-07-12 09:06:221266browse

Meta http-equiv attribute detailed explanation (translated), metahttp-equiv

http-equiv, as the name suggests, is equivalent to the file header function of http. It can return some useful information to the browser. information to help display web page content correctly and accurately. The corresponding attribute value is content. The content in content is actually the variable value of each parameter.

Quote The syntax format of the http-equiv attribute of the meat tag is: ; the http-equiv attribute mainly has the following parameters:



1. Expires

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:

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. <meta http-equiv="expires" content="Wed, 20 Jun 2007 22:33:00 GMT">


Note: GMT time format must be used.

2. Pragma (cache mode)
Description: It is used to set up to prohibit the browser from accessing page content from the cache of the local machine. Once you leave the webpage after setting, Cannot be retrieved from Cache
Usage:

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. <meta http-equiv="Pragma" content="no-cache">


Note: With this setting, visitors will not be able to browse offline.

3. Refresh
Description: Automatically refresh and point to a new page.
Usage:

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. <meta http-equiv="Refresh" content="2;URL=http://www.net.cn/">


Note: The 2 refers to automatically refreshing 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:

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. <meta http-equiv="Set-Cookie" content="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:

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. <meta http-equiv="Window-target" content="_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:

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. <meta http-equiv="content-Type" content="text/html; charset=gb2312">



7. Pics-label (webpage rating)
Usage:

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. meta http-equiv="Pics-label" contect="">


Note: There is a content setting in IE's internet options that can prevent browsing of some restricted websites, and the restriction level of the website is set through the meta attribute.

8. Page_Enter, Page_Exit
Set special effects when entering the page

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. meta http-equiv="Page-Enter" contect="revealTrans(duration=1.0,transtion= 12)"


Set special effects when leaving the page

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. meta http-equiv="Page-Exit" contect="revealTrans(duration=1.0,transtion= 12)"



The value of Duration is the time for dynamic transition of the web page, 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 grid blinds 11 Vertical grid blinds
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 From 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 From the lower left Expand the corner to the upper right corner 21 Horizontal linear expansion
22 Vertical linear expansion 23 Randomly generate a transition method

9. Clear cache (re-download when visiting this website again!)

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. meta http-equiv="cache-control" content="no-cache">



10. Set the expiration time of the web page

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. meta http-equiv="expires" content="0">



11. Keywords, used by search engines

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
  1. meta http-equiv="keywords" content="keyword1,keyword2,keyword3">



12. Page description

Html code Detailed explanation of Meta http-equiv attributes (transfer), metahttp-equiv_PHP tutorial
    1. meta http-equiv="description" content="This is my page">

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1065326.htmlTechArticleMeta http-equiv attribute detailed explanation (transfer), metahttp-equiv http-equiv, as the name suggests, is equivalent to the file header of http Function, it can return some useful information to the browser to help correct and accurate...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn