Original finishing is not easy, reproduced please indicate the source: using SSH to develop rest Web Services support HTTP ETag Header tutorial detailedCode: http://www.zuidaima.com/share/1777391667989504.htmIntroductionThe great impact of the rest-mode application architecture in recent days has highlighted the importance of elegant design for Web applications. Now people are beginning to understand the in
the case, delete the Headerunset etag line.
Steps 3
Restart the httpd, and the ETag is enabled.
Second, Nginx
Step 1
Confirm Nginx version, command: Nginx installation directory/sbin/nginx–v,
Version is 1.7.3 and higher, proceed to step 2, version 1.7.3 below, 1.3.3 and above, proceed to step 3, version 1.3.3, do not support
determine whether the file continues to cache
The process is as follows:
1. Client requests a page (a).
2. The server returns page A and adds a last-modified/etag to a.
3. The client presents the page and caches the page along with the Last-modified/etag.
4. The Customer requests page A again and passes the Last-modified/etag returned by the server to the server
together with Last-Modified/ETag.4. The customer requests page A again and passes the Last-Modified/ETag returned by the server in the Last request to the server.5. The server checks the Last-Modified or ETag and determines that the page has not been Modified since the Last client request. The server returns the response 304 and an empty response body.Note:1. Th
HTTP reponse that are emitted by the WEB server Header,web server should support both headers.2. After the WEB server sends the LAST-MODIFIED/ETAG header to the client, the client caches the headers;3. When the client initiates a request for the same page again, the HTTP requestheader:if-modified-since and if-none-match corresponding to the Last-modified/etag wi
from the code:
If last-modified, expires is not set before, then this is assigned to them according to the settings of the cache.
If settings. Use_etags is true, and the ETag is not set, the default method or custom method will be called to assign the ETag value.
Because the default method _set_response_etag is to use the response content to calculate the MD5 value assigned to the
used at the same time, that is, after the modification time and the ETag are fully matched if-modified-since and If-none-match. The server can return 304.The following is the configuration of the ETag in ApacheThe support for setting the ETag in Apache is relatively simple, just add the following to the Apache configu
the file continues to cache
The process is as follows:
1. Client requests a page (a).
2. The server returns page A and adds a last-modified/etag to a.
3. The client presents the page and caches the page along with the Last-modified/etag.
4. The Customer requests page A again and passes the Last-modified/etag returned by the server to the server together with the
a page (a). 2. The server returns page A, and adds a last-modified/etag to a . 3. The client presents the page and caches the page along with Last-modified/etag. 4. The Customer requests page A again and passes the Last-modified/etag that the server returned on the last request to the server. 5. The server checks the last-modified or
presents the page and caches the page along with the Last-modified/etag.4. The Customer requests page A again and passes the Last-modified/etag returned by the server to the server together with the last request.5. The server checks the last-modified or ETag and determines that the page has not been modified since the last client request, returning directly to r
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
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
two values can be. If there is no change, the response code for the server is not HTTP (OK), but 304.
As pictured above. Openrss is currently subscribed to more than 40 feeds, but the response rate is very good. In the process of using Gregarius (Lilina also applied ETag), found feedburnrer burning Feed, almost all with ETAG (otherwise estimated server will be paralyzed, Hoho) . Let 's test the re
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
the database, so there should be a corresponding table in the database and the Stored Procedure for operating this table. Therefore, we need to execute an SQL script. This script is usually used in "{projectpath} \ packages \ CacheCow. Server. EntityTagStore. SqlServer.0.4.11 \ script"
After executing this script, you will find that the database has one more table and five stored procedures:
The last article dragged on for a long time finally met everyone. It was mainly about some theories and
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).
Address: http://blog.chinaunix.net/uid-20614434-id-2999833.html
Author: finalbsdDate: 2008-07-08Previously, etag only provided the simplest description of resumable upload without further research. I studied for a while today, hoping to answer the question of Laurence, haha :)
1. Concept of resumable uploadResumable upload can be divided into two parts: one is a breakpoint and the other is a resumable upload.
BreakpointThe reason is that during the d
on element timestamp, not to mention that removing ETag reduces the HTTP headers size of HTTP response and subsequent requests. Microsoft Support article describes how to delete etags, but under Apache, just set Fileetag none in the configuration file.
In theory, the etag deletion of the server will improve the performance of the HTTP request, but according to
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.