MIP Cache Specification
Baidu MIP-Cache provides cache services to all MIP pages that meet the specifications, which can actively improve page loading speed and provide cache services for images, CSS files and other resources on pages using MIP-Cache services. In this way It can ensure that all HTTP requests come from the same source, which can speed up the loading speed.
How to use
When developing pages, there is no need to pay extra attention to MIP Cache. Just ensure that MIP pages, pictures and other resources are captured by UA (baidumip, baidumib) that allows MIP cache. .
When quoting static resources such as images, no matter whether https is supported or not, just quote the images on the server of this site directly. For example, use: <mip-img src="http://www.baidu.com/logo.png">
.
MIP-Cache Validation Process
After the MIP page is crawled by the crawler, the static resources will be automatically cached, and the static resource reference address in the page will be replaced with the cache address. The search results page will jump to the MIP-Cache URL first. When the MIP-Cache cache expires, a return to the origin will be performed, and the original page URL will be accessed and cached again.
The cached pages are all https, which is more secure.
Understand the url rules of MIP cache
url rules are related to the following situations:
内容类型:图片、MIP页面等,图片使用'/i',其他使用'/c' 协议类型:使用TLS,https的增加'/s',http的不加
For example:
1, web page address or css, js https resources:
originalUrl:https://www.mipengine.org/ cdnMipUrl:https://mipcache.bdstatic.com/c/s/www.mipengine.org
http resources:
originalUrl:http://m.example.com/ cdnMipUrl:https://mipcache.bdstatic.com/c/m.example.org
2, pictures https resource:
originalUrl:https://www.mipengine.org/static/img/banner_wise_3f04050.jpg cdnMipUrl:https://mipcache.bdstatic.com/i/s/www.mipengine.org/static/img/banner_wise_3f04050.jpg
http resource:
originalUrl:http://www.sinaimg.cn/dy/slidenews/1_img/2016_25/2841_703424_763161.jpg cdnMipUrl:https://mipcache.bdstatic.com/i/www.sinaimg.cn/dy/slidenews/1_img/2016_25/2841_703424_763161.jpg
Page encoding requirements
Force the use of UTF-8 encoding
MIP Cache update mechanism
MIP Cache regular update mechanism
MIP Cache regular update mechanism is also the most common and commonly used update mechanism for pages. The current page update cycle is 52 minutes. When a user accesses a MIP page, if the page cache has timed out, MIP Cache will return the current page to the user; at the same time, asynchronously initiates a request to update MIP Cache pages stored in . In this way, subsequent users who visit this page will see the updated page. Currently, the average time for online page updates (which can be understood as the time between clicks) is about 1 day. Currently, for sites with many crawling restrictions, the timeliness of updates cannot be guaranteed. Please also ask relevant webmasters to ensure the stability of their own websites and services.
MIP Cache fast update mechanism
Considering some special circumstances, the pages in the MIP Cache need to be updated as soon as possible. For example, when online BUGs are urgently repaired or web pages are found to contain pornographic content that needs to be updated or deleted urgently, MIP Cache also opens a separate cleaning interface. Read
MIP Cache page deletion
If there are some abandoned pages that need to be deleted:
- The webmaster first deletes the original page of this site
- Call MIP Cache Quick update mechanism deletion Cache
- After deletion, please give MIP Cache a non-200 (404 or other) status code to prevent cached error pages in the cache.
Add prefetch tag
To be expanded
<link href="***" rel="dns-prefetch">