Reading websites on mobile terminals will inevitably encounter transcoding problems. As the leader of domestic search engines, Baidu naturally needs to be a leader in technology. Baidu transcoding has been done. Some websites have achieved the desired results after transcoding. , but some websites cannot bear to be looked at directly after being processed by Baidu. Many contents are confused, and Joe's website also has some misalignments, so Joe used the WordPress plug-in MobilePress. After some Chinese modifications, he felt that it was more suitable for him than Baidu's transcoding. .
Method 1. Explicitly declare in HTTP Response, Cache-control: no-transform.
Add 'HTTP_CACHE_CONTROL' to the config.php file => 'private,no-transform', // Web page cache control
Method 2: Explicitly declare Cache-control as no-tranform in the meta tag, the format is:
<head> <meta http-equiv="Cache-Control" c/> </head>
The above is the ThinkPHP setting introduced by the editor to prohibit Baidu and other search engines from transcoding ( Simple and practical) related content, I hope it will be helpful to everyone.
The above is a simple and practical introduction to ThinkPHP settings to prohibit search engine transcoding such as Baidu, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.