Large top view
Welcome toShopXOEnterprise levelB2COpen source e-commerce system、Do not initiate payment for demonstration site、To avoid unnecessary property loss。

ShopXOEnterprise levelB2CE-commerce system provider - Demo Site

All classification
All classification

Nothing to do,Analyze how Baidu implements cancellationrefererKeyword displayed

Or this year6end of month,Baidu released a full cancellationrefererNotification of keyword display,The purpose of listening and speaking is to protect user privacy and site traffic keyword data。

Nothing to do,Analyze how Baidu implements cancellationrefererKeyword displayedThe specific announcement is as follows:

Dear webmasters:

Baidu has realized the whole sitehttpsturn,stayBATChina takes the lead in completing the whole station encryption,To promote network environment security。To further protect user privacy,Prevent third party eavesdropping and tampering,Baidu has6month25Officially cancelled onrefererDisplay of keywords in,Better protect site traffic keyword data information,Make site data more private。When the webmaster needs to obtain website traffic keywords,Still availableTraffic and keyword tools provided by Baidu webmaster platformOr Baidu statistics related functions。

But nothingLuse,I don't know who searched Baidu for any shady things,Hiding keywords. Isn't that taking off your pants and farting?

in addition,Protect site traffic keyword data,I think this is very useful,Some people in Guangdong Province are always looking at the website of which article has a very powerful keyword,Then he copied and pasted。however,This practice cannot be completely eliminated,Why??Because you have a Baidu index function!When others get high index words, they will know who is the first in the article?But it only increases the degree of trouble!

Say a sorry thing,When this announcement came out,I don't really understand what it means。。。Think it will not happen if you click a link on one page and jump to another pagereferer?It's not scientific!Then I didn't care。。。

Until recently,I accidentally found the original works of Zhang Ge's blog【Welcome box for searching the way】No keywords:

Nothing to do,Analyze how Baidu implements cancellationrefererKeyword displayed

I thought it was my codeBUGHas,So I personally output itrefererHave a look,I found that the code I wrote was still availablereferer,unfortunatelyrefererKeywordswdThe value of is empty,such as:

At this time, it arouses my interest,understand referer All of our friends know,When we clickALinks in the page jump toBOn page,BInside the page referer Value isAPage Address。

in other words,I search Zhang Ge's blog on Baidu,Then the page address should be: Ge's Blog

I.eAPage Address,If we click the first link from this search result to come to Zhang Ge's blog,Then referer It should be the search address above!How does Baidu hide this keyword??

the other day,When writing a crawler script,For the first time, I tried the links in Baidu search results,I finally understand the mystery,Feels very interesting,So we continue to press other original dry goods in the draft box to get moldy,First share this discovery。

Take Zhang Ge's blog as an example!The results of Baidu's search of Zhang Ge's blog are shown in the following figure:

Nothing to do,Analyze how Baidu implements cancellationrefererKeyword displayed

next,I tried toLinuxUsed undercurlrequest,See the figure below:

Nothing to do,Analyze how Baidu implements cancellationrefererKeyword displayed

Format the results:

<meta content="always" name="referrer">

<script>try {

if (window.opener && window.opener.bds && window.opener.bds.pdc && window.opener.bds.pdc.sendLinkLog) {



} catch(e) {};

var timeout = 0;

if (/bdlksmp/.test(window.location.href)) {

var reg = /bdlksmp=([^=&]+)/,

matches = window.location.href.match(reg);

timeout = matches[1] ? matches[1] : 0


setTimeout(function() {




<noscript><META http-equiv="refresh" content="0;URL=''"></noscript>

Then I understand how Baidu can hide keywords。

Quite simple,But it's a clever way:Baidu's current search result links no longer jump directly to the target page,But through a hidden transit page。The general function of the above code is,If the browser supportsJavascript,Then thejsFunction jumps to the target page,If the browser does not supportJavascript,Then we can also pass the finalMETATags enable browsers to jump。

With this middle page,Then the key words will be broken,Because there are really keywords referer It can only be obtained from the middle page,Obtained from the target page referer Is the address of the middle page,There is no keyword!

Baidu is really considerate!...

It's good I wrote it【Welcome box for searching the way】It is compatible with empty keywords,Otherwise, the display is null Has。

Since we know that there is such a clever way,Can we learn from some scenes?I think it must be useful,It's just that you haven't met。。。such as,Your page secretly linked to the address of a website,Don't want the webmaster to know?But it's boring enough,Ha ha ha!


Open WeChat,Click on the bottom“find”

use“scan”You can share the webpage to your friends

Online consultation
open shrink

ShopXOOnline Service

Wechat customer service

Wechat code scanning consultation

User center
My Tracks
My collection
common 0 Kinds of goods total: ¥0.00

Your shopping cart is still empty,You can

  • Wechat applet

    Wechat applet
  • Wechat official account

    Wechat official account
Online Message
Back to top
Currently a demo site、Do not pay!!!