is actually that I have been writing a chrome plug-in recently, in which I want to request an image address without referrer information in order to avoid the hotlink protection mechanism of the image resource server.
< meta name= "referrer" content= "never" >
but I encountered a problem. When I set the tag above,
suppose I use img to request an address, which will not bring referrer information
<img src={this.props.avatarSrc} alt=""/> //
// referer policy no-referrer
but once I switch to a background picture
<span className="avatar" style={{backgroundImage:`url(${this.props.avatarSrc})`}}></span>
// referer
// referer policy no-referrer-when-downgrade
querying the following seems to mean that when downgraded to a http request without adding referrer, after my attempt, the demotion to an ordinary http request does not seem to take effect
so my question is why are these two HTTP requests so different for referer? What is the reason?
:: in subsequent updates, I found that both methods are OK under Firefox, and only under chrome will they be forced to bring referrer
.