speed inconsistent buffering, the data is temporarily written to the nearest place, to improve the write speed.The CPU writes the data line to the memory disk buffer, then thinks that the data has been written, and then the kernel thread writes to disk at a later time, so the server suddenly loses some of the data in memory.Cache: Caching is also called Read cache, commonly used for read operations, CPU read files from memory read, if the memory is n
All PHP programmers know that echo "1" is executed in the PHP script, and "1" is displayed in the guest's browser.However, when we execute the code below, we do not display "2" after "1" for 5 seconds, but wait 5 seconds to display "12" directly.Echo ' 1 '; Sleep (5); Echo ' 2 ';This involves a few caching mechanisms, for a higher salary, students are very necessary to this caching mechanism to learn well.T
first, browser caching mechanism processLoad Web content for the first time
Load Web page content again
Ii. Interpretation of relevant termsEtag
The HTTP protocol specification defines etag as the entity value of the requested variable. Alternatively, ETag is a token (token) that can be associated with a Web resource. A typical web resource can be a Web page, but it may also be a JSON or XML document. The
browsing ) To tell the browser to continue using the saved cache. If-none-match:When a resource expires (usingCache-controlidentified byMax-age), the discovery resource hasEtagedeclaration, you againweb server request with top if-none-match ( etag value) . web when the server receives the request, it finds the header IF-NONE-MATCHNBSP; 200 or 304 last-modified/if-modified-sincelast-modified/if-modified-since to
Before the project encountered a lot of browser cache related issues, also on the Internet to check the data, the server configuration, to ensure that the client load server resources speed and resource effectiveness. Recently carefully looked at the next HTTP protocol and cache-related properties, summed up.Browser caching principle Text version description① browser
Transferred from: http://www.cnblogs.com/tzyy/p/4908165.htmlBrowser Caching principle:1, the browser first access to the server resource/index.html, in the browser does not have a cache file, directly to the server to send a request, the server returns a number of OK The entity returns the contents of the index.html file and sets a cache expiration time, a file m
The browser's caching policy temporarily caches the browsed files on the local disk. When the user repeatedly requests the page, it tells the client that the page has not changed and can call the cache. So how do you know if the client has page caching? From the HTTP protocol level, the browser sends the request as follows
HTTP Header:
Connection keep-aliveDate S
About Browser Caching
Browser caching, sometimes we need him, because he can improve Web performance and browser speed, improve site performance. But sometimes we have to clear the cache, because the cache may be bad, there are some wrong data. such as the stock site real-t
This article introduces to you about Nginx as a static resource Web service to control the browser cache and the implementation of anti-theft chain, there is a certain reference value, the need for friends can refer to, I hope to help you.
One, control browser cache
1. Introduction to Browser caching
The
Chapter Directory Browser cache principle text version description a map to cache related header field Request cache related Header field Response cache Related Header field entity header cache related fields cache configuration some considerations
Before the project encountered a lot of browser cache related issues, also on the Internet to check the data, the server configuration, to ensure that the client
DescribeWhen you browse the Internet, browser usually caches some documents to reduce the time cost of fetching them from remote s Ervers. Let ' s consider a simplified caching problem. Assume the size of browser ' s cache can store M pages. When user visits some URL, browser would search it in the cache first. If the
All PHP programmers know that echo "1" is executed in the PHP script, and "1" is displayed in the guest's browser.However, when we execute the code below, we do not display "2" after "1" for 5 seconds, but wait 5 seconds to display "12" directly.This involves a few caching mechanisms, for a higher salary, students are very necessary to this caching mechanism to learn well.Typically, our web application cons
Whether you use PHP to open the browser cache or use the APACHE,IIS server environment to configure we will be for the browser Cache-control to operate, let me introduce you to PHP settings picture browser cache
Cache-control
Cache-control is the most important rule. This field is used to specify the instructions that all cac
tool to be able to see to send the byte is 0byte, if the cache expires, then it performs the F5 refreshes the action.Refresh (F5): This refresh is also based on whether the cache has last-modified to decide, if there will be transferred to 304 or 1024x768 (PHP), if there is no last update time then go to the server to read, return the real document size.Forced Refresh (CTRL+F5): Completely discard the caching mechanism, go to the server to read the l
This article is prohibited from being reproduced and produced internally by the UC browser.0. Foreword OutlineBrowser caching and storage-related features fall into four categories:
Loading process
Memory Cache
Application Cache (abbreviated as AppCache)
HTTP Cache
Cookie Storage
Javascript API
Web Storage
Indexed Database
File API
Cache-control/pragma This HTTP head field is used to specify the instructions that all caching mechanisms must obey throughout the request/response chain, and if the page is known to be cached, it can control not only the browser, but also the cache or proxy server associated with the HTTP protocol.The Cache-control request field is supported by the individual browsers, and it has a higher priority, and whe
About browser caching for static files When the browser loads the page for the first time, the browser requests a static file (Css,js,image)from the page, and the server returns the full file content and returns a status code that indicates the request was successful. When the user clicks the Refresh button again or
A resource on a page can be easily divided into two categories:
URL variable, such as the CSS file on this page, this may be app.fe5a24f8ae.css, next time may be app.613e5f58f1.cssURL can not change, such as the URL of this pageFor them, we can cache differently.
For example, the first, we can set the response head like this:
Cache-control max-age=31536000, Must-revalidate
Indicates that the resource is valid for a year, and that it will not be validated on the server until it expires.
So,
To improve the speed of accessing Web pages, the InternetExplorer browser uses a cumulative acceleration method that stores the content (including pictures, cookies, and so on) and most of the information and content you have visited on your computer. This storage space, we call it the IE cache. Every time we visit the site, IE will first search this directory, if the content has been visited, IE does not have to download from the Internet, and direct
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.