Introduction to response. setHeader parameters and usage

Source: Internet
Author: User
Tags microsoft frontpage

Meta is used to simulate HTTP Response Header packets in HTML documents. Meta Tags are used in 1. <meta name = "Generator" contect = ""> describes generation tools (such as Microsoft FrontPage 4.0;
2. <meta name = "KEYWords" contect = ""> describe KEYWords Of Your webpage to search engines;
3. <meta name = "DEscription" contect = ""> tell the search engine the main content of your site;
4. <meta name = "Author" contect = "Your name"> tell the search engine the creator of your site;
5. <meta name = "Robots" contect = "all | none | index | noindex | follow | nofollow">
The attributes are described as follows:
Set to all: the file will be retrieved, and the link on the page can be queried;
Set to none: files will not be retrieved, and links on the page cannot be queried;
Set to index: the file will be retrieved;
Set to follow: links on the page can be queried;
Set to noindex: the file will not be retrieved, but the link on the page can be queried;
Set to nofollow: files will not be retrieved, and links on the page can be queried.
Http-equiv attributes
1. <meta http-equiv = "Content-Type" contect = "text/html "; charset = gb_2312-80 "> and <meta http-equiv =" Content-Language "contect =" zh-CN "> describe the text and Language used by the home page;
Such as English is the ISO-8859-1 character set, there are BIG5, UTF-8, shift-Jis, Euc, Koi8-2 Character Set;
2. <meta http-equiv = "Refresh" contect = "n; url = http: // yourlink/"> regularly redirect a webpage to http within the specified time range: // yourlink /;
3. <meta http-equiv = "Expires" contect = "Mon, 12 May 2001 00:20:00 GMT"> you can set the expiration time of a webpage, once it expires, it must be called again on the server. Note that the GMT time format must be used;
4. <meta http-equiv = "Pragma" contect = "no-cache"> is used to disable the browser from accessing the page content from the cache of the local machine, once the page is set, it cannot be called out from the Cache;
5. <meta http-equiv = "set-cookie" contect = "Mon, 12 May 2001 00:20:00 GMT"> cookie setting: If the webpage expires, the cookie on the disk will be deleted. Note that the GMT time format must be used;
6. <meta http-equiv = "Pics-label" contect = ""> webpage rating: There is a content setting in internet Options of IE, it can prevent browsing of some restricted websites, and the website's restricted level is set through the meta attribute;
7. <meta http-equiv = "windows-Target" contect = "_ top"> force the page to be displayed on an independent page in the current window, it can prevent your webpage from being called as a frame page by others;
8. <meta http-equiv = "Page-Enter" contect = "revealTrans (duration = 10, transtion = 50) "> and <meta http-equiv =" Page-Exit "contect =" revealTrans (duration = 20, transtion = 6) "> set the special effect when you enter and Exit the Page, this function is called "format/Webpage transition" in FrontPage. However, the added page cannot be a frame page.
Cache-Control header field
Cache-Control specifies the Cache mechanism that requests and responses follow. Setting Cache-Control in a request message or response message does not modify the Cache processing process of another message. The cache commands in the request include no-cache, no-store, max-age, max-stale, min-fresh, only-if-cached, commands in the Response Message include public, private, no-cache, no-store, no-transform, must-revalidate, proxy-revalidate, and max-age. The instructions in each message are as follows:
Public indicates that the response can be cached in any cache area.
Private indicates that the whole or part of the response message of a single user cannot be processed by the shared cache. This allows the server to only describe part of the user's response message, which is invalid for requests of other users.
No-cache indicates that the request or response message cannot be cached.
No-store is used to prevent the unintentional release of important information. Sending a request message does not cache the request and response messages.
Max-age indicates that the client can receive responses with a lifetime not greater than the specified time (in seconds.
Min-fresh indicates that the client can receive a response whose response time is earlier than the current time plus the specified time.
Max-stale indicates that the client can receive response messages beyond the timeout period. If the value of the max-stale message is specified, the client can receive response messages that exceed the timeout period.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.