To submit data to Baidu, we basically will think of Sitemap, recently launched the etag is what dongdong? Is it really effective?
Sitemap is one of the most important ways to solve the site, and the usual Sitemap updates are not very timely, and volume are relatively large, at this time also consumes the corresponding Web site traffic and bandwidth. And ETag can be used to indicate whether the Web page has
the etag that was returned when page A was last requestedThe server checks the etag sent over by the client and determines that page A has not changed since the last request of the client, and therefore sends a 304 (unchanged) response header to the client, with an empty response body.The remainder of the article will discuss the use of ETag in the Springframewo
Etag
Edit entry Sharing
This entry was created by LCLNL, and has been edited 2 times by a total of 1 collaborators. The newest association author: lclnl. Please describe the term in a simple sentence and add a summary immediately. directory 1 how last-modified and etags help improve performance? 2 Function 3 Working principle 4 Apache ETag to achieve 5 weak checksum (weak
1, ETag and expires the client-side HTTP Request header and server-side HTTP reponse Header working principle.
2, static under the Apache, Lighttpd and Nginx ETag and expires configuration
3. ETag and expires processing in non-real-time interactive dynamic pages
When the client makes the first request for a URL through the browser, according to the HTTP protoc
The HTTP specification defines ETag as the object Value of the requested variable ".
In other words, ETag is a token that can be associated with Web resources ). A typical Web resource can be a Web page, but it may also be a JSON or XML document. The server is solely responsible for determining what the mark is and its meaning, and transmitting it to the client in the HTTP Response Header. The following is
1. How the Client-side Http Request Header and Server-side Http Reponse Header work in Etag and Expires.
2. Static configuration of Etag and Expires in Apache, Lighttpd, and Nginx
3. Etag and Expires processing on dynamic pages with non-real-time interaction
When the client sends a Request for a URL for the first time through a browser, the browser will send th
1) What is "last-modified"?When the browser requests a URL for the first time, the server-side return status is 200, the content is the resource you requested, and there is a last-modified attribute that marks the last time the file was modified at the end of the service period, similar in format:Last-modified:fri, 2006 18:53:33 GMTWhen the client requests this URL for the second time, according to the HTTP protocol, the browser transmits the If-modified-since header to the server, asking if the
Etag
Text/finalbsdWe all know that there is an etag in HTTP/1.1 to determine whether the requested file has been modified.Why use etag? Etag is mainly used to solve some problems that last-modified cannot solve.1. Some files may be changed cyclically, but their content does not change (only the modification time).
The rest API, which is made with the Django Rest framework, has an API that requires:The app side requests this API, the server side reads the data from the database, returns the JSON. The amount of data returned is slightly larger, but may only be modified once a year, so you want to be able to transfer data only when the data is modified, so that the app side updates.1. Last-modified and ETagThe HTTP response header last-modified and ETag both imple
Re: http://www.oschina.net/question/234345_42536? Sort = Time
If the server is a cluster, the etag parameters in the HTTP header returned by different servers are different. If the image is generated by a program, we can use the no-Cache headers to control it. But what if these images are Apache or nginx?The following describes etag:
Etag is introduced in http1.
In the study of tornado, there is an etag more curious, from the online query excerpt as follows:ETag is introduced in HTTP1.1, the main function is to add a (CSS file, image, JavaScript file) a unique parameter (equivalent to the query parameter string), the ETag has server-side generation, and as the file changes, In this way, the browser will only re-request to obtain the
resources are not duplicated to the client and that the client is able to get the latest resources when the server changes.
Note: If the if-modified-since time is later than the current time of the server (current request time request_time), it will be considered an illegal request.
2 , Etag Working principle
The HTTP protocol specification defines etag as the entity tag of the requested variable (see 14.
server changes. Note: If the if-modified-since time is later than the current time of the server (the current request time Request_time), it will be considered an illegal request .2 , how the Etag works The HTTP protocol specification defines the ETag as the entity tag of the requested variable (see 14.19). The simple point is that the server responds with the request URL token and transmits it to the cli
Https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching?hl=zh-cnThe only thing we have to do is make sure the server provides the necessary ETag tokens. Check your server documentation for any configuration flags that are not necessary.There is no etag is the server configuration,
Each resource can define its cache policy through the Cache-control HTTP
Etag-last-modifiedAnd how does etags help improve performance?
Use the HTTP header of the last-modified and etags requests together, so that the cache of the client (such as a browser) can be used. Because the server first generates the last-modified/etag mark, the server can use it later to determine whether the page has been modified. Essentially, the client sends this mark back to the server and requires
-modified-since time is later than the current time of the server (current request time request_time), it will be considered an illegal request.2, ETag working principleThe HTTP protocol specification defines etag as the entity tag of the requested variable (see 14.19). A simple point is that the request URL is marked when the server responds and is routed to the client in the HTTP response header, similar
http://www.cnblogs.com/hust-ghtao/: Hua ke xiao Tao: The previous time to participate in a company's interview, asked me etag field, when said is not very clear, found some information, collation for this article. simple ETag is similar to the fingerprint of a resource entity, and they can be quickly compared to determine whether the two versions of the resource are the same . The
Principle: Do not use Javascript,session,cookies,flash.
Using picture ETag to identify users
1. Generate a unique etag based on the user's remote_addr and http_user_agent.
2. Output the ETag to the client.
3. Get Http_if_none_match to determine whether to access the same user.
. htaccess rewrite
SOURCE index.php:
? Define (' SECRET ', ' j8s91slksd9ab
Caching mechanismCheck the Expires expiration time (in http1.0),
(in http1.1) check Cache-control for Max-age, higher priority
Pragma (compatible with http1.0, which has the same meaning as Cache-control in http/1.1 protocol)
Whether the cache resource can be used directly.
You can use: Returns a (from cache) when no interaction between the browser and the server has expired:
(1) Using last-modified
If-modified-since: Last Modified time
The server determines whether the resource is modified or n
In ASP. NET Web APIs, cache is implemented through ETag, and apietag
Generally, the Server is stateless. in ASP. NET Web APIs, we can generate the ETag attribute in the Server response body and play a cache role. The general implementation principle is:1. An ETag attribute is returned in the response body of the server.2. The client passes the attribute value of
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.