First, prefacePrior to understanding the use of okhttp cache, and the use of the cache is a preliminary summary of 80650856. The cache is primarily intended to obtain resource information directly from the cache in the absence of a network, or when
Both expires and max-age can be used to specify the expiration time of a document, but there are some minor differences1.Expires has been defined in the http/1.0, cache-control:max-age in http/1.1 is defined, in order to backward compatibility, only
Set static content cache time39 problems-client cache time can be set for infrequently changed static resources to reduce requestsFAILED-(max-age or expires not Set)-http://pic.111cn.net/h470.gifFAILED-(max-age or expires not
The apache prompts that the max-age or expires solution is not set. max-ageexpires
You should know that you only need to Set max-age or expires. The following method is used to set apache:
Generate to enable
The Code is as follows:LoadModule headers_
Both Expires and max-age can be used to specify the document expiration time, but there are some nuances between the two. 1. Expires has been defined in HTTP/1.0. Cache-Control: max-age is defined only in HTTP/1.1. For backward compatibility, it is
This should be known as long as you set the Max-age or expires on the line. Here's how to set the method under Apache:Generate to openCode to copy code as followsLoadModule Headers_module modules/mod_headers.soAnd then write it down Under the.
You should know that you only need to set max-age or expires. The following method is used to set apache:Generate to enable The code is as follows:Copy code LoadModule headers_module modules/mod_headers.so Then write it under the. htaccess file
The cache of web pages is controlled by "cache-control" in the HTTP message header. common values include private, no-cache, Max-age, and must-revalidate, the default value is private. The function of browser review is divided into the following
Reprinted from Http://www.cnblogs.com/igin/archive/2008/05/04/1181056.htmlThe cache of the Web page is controlled by the "Cache-control" in the HTTP message header, and the common values are private, No-cache, Max-age, must-revalidate, etc., and the
Cache-control max-age=0 Cache-control no-cache-forces each request to be sent directly to the source server, without the checksum of the locally cached version. This is useful for verifying the authentication application (which can be used in
Why is rt 200 (fromcache)? Why is rt 200 (from cache)
Reply content:
Why is rt 200 (from cache)
200 (from cache) is a cache that is not directly read from the server like sending requests304 is to send a request to the server. If the server
Expires attributesCoolie lifetime is specified. By default, coolie exists temporarily, and their stored values only exist during browser sessions. These values are also lost when users launch browsers, if you want the cookie to exist for a period of
The Cache header does not work & lt; metahttp-equiv = & quot; Cache-Control & quot; content = & quot; max-age = 7200 & quot;/& gt; if you have any questions, please add this sentence to the html page. I don't know why. & lt; the meta cache header
Nginx Agent done, the cache is also configured, but found that CSS, JS, jpg these static files are all cached success. But the page file is still to the source server.1. Nginx does not cache reasonby default, whether the cache is nginx by the Nginx
Reprinted from: HTTPS://WWW.JIANSHU.COM/P/32733A356ACF
Network-specific latency and the cost of data transmission, restricting the Internet to quickly obtain web resources. To this end, the HTTP protocol introduces caching to space-time, allowing
Original address: http://tools.ietf.org/html/rfc2616#section-14.9Content of this articleOverviewTermsHTTP Cache-control HeaderResources that can be cachedResources that can be stored in cacheModify the basic expiration mechanismCache
Cache header does not work
I have a question for you.
In the HTML page add this sentence useless don't know what reason
Or is there any way to control a single static page cache time?
------Solution--------------------
htaccess file Contents:header set Cache-control" max-age=604800, public "header set Cache-control" max-age=18000, Public, must-revalidate "header set Cache-control" max-age=3600, Must-revalidate "by default7#zbphp.com
Document directory
Cache channel)
Let's look back at the simple implementation of cache in rest wcf 4.0:
1. Configuration
2. Use Configuration
[OperationContract][WebGet (UriTemplate = "/Time")]
[AspNetCacheProfile
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.