(The java + springmvc framework development project encountered problems) Detailed explanation of Meta http-equiv attributes and HTTP headers in Expires (Cache-control)

Original link: https://www.cnblogs.com/mituxiaozhan/p/5077076.html
1. Overview
A. http-equiv, as the name implies, is equivalent to the role of the http file header. It can return some useful information to the browser. To help display the content of the webpage correctly and accurately, the corresponding attribute value is content, and the content in the content is actually the variable value of each parameter.
B. Cache-control is used to control the HTTP cache (may not be partially implemented in HTTP / 1.0, only Pragma: no-cache)

Second, the basic content

The syntax format of the http-equiv attribute of the meat tag is: <meta http-equiv = "parameter" content = "parameter variable value">; the
http-equiv attribute mainly has the following parameters:

1. Expires (term)
description: can be used to set the expiration time of the web page. Once the webpage expires, it must be retransmitted to the server.
usage:

1<meta http-equiv=“expires” content="Wed, 20 Jun 2007 22:33:00 GMT">

Note: The time format of GMT must be used.
2.
Description of Pragma (cache mode) : It is used to prohibit the browser from reading the content of the page from the cache of the local machine. Once set, it cannot be recalled from the cache once it leaves the web page.
Usage:

<meta http-equiv=“Pragma” content="no-cache">

Note: With this setting, visitors will not be able to browse offline.
3. Refresh (refresh)
description: automatically refresh and point to a new page.
usage:

1<meta http-equiv=“Refresh” content="2;URL=http://www.net.cn/">

Note: 2 of them refers to automatically refreshing to the URL after staying for 2 seconds.
4. Set-Cookie (cookie setting)

1<meta http-equiv=“Set-Cookie” content="cookievalue=xxx;expires=Wednesday, 20-Jun-2007 22:33:00 GMT; path=/">

Note: The time format of GMT must be used.
5. Window-target (display window setting)
Description: Force the page to be displayed as a separate page in the current window.
usage:

1<meta http-equiv=“Window-target” content="_top">

Note: Used to prevent others from calling their own pages in the framework.
6.
Description of content-Type (display character set) : Set the character set used on the page.
usage:

<meta http-equiv=“content-Type” content="text/html; charset=gb2312">

7.
Usage of Pics-label (Web Page Rating) :

1

Note: There is a content setting in the Internet option of IE, which can prevent browsing some restricted websites, and the restriction level of the website is set through the meta attribute.
8. Page_Enter and Page_Exit
set special effects when entering the page

1

Set special effects when leaving the page

1

The value of Duration is the time for the dynamic transition of the webpage, in seconds.
Transition is a transition method, and its value is 0 to 23, corresponding to 24 transition methods. The following table:
0 Box-shaped contraction 1 Box-shaped radiation
2 Circular contraction 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 blinds 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 lower ends 17 Expand from the upper right corner to the lower left corner
18 From Lower right corner expands to upper left corner 19 Expands from upper left corner to lower right corner
20 Expands from lower left corner to upper right corner 21 Horizontal linear expansion
22 Vertical linear expansion 23 Randomly generates a transition method

9. Clear the cache (re-download if you visit this site again!)

1

10. Set the expiration time of the web page

1

11. Keywords for search engines

1

12. Page description

1

Published 9 original articles · Likes0 · Visits 797

Guess you like

Origin blog.csdn.net/Tao_Yuanqiang/article/details/102584014