问题
I was wondering how facebook redirects keeps its favicon when you click a link on facebook its open new tab with the FB favicon
I am wondering how could this be accomplished
Its not iframe so how could i do such thing
Where I should start ? And while the redirect there is a URL called maybe it does everything
Regards
回答1:
Are you using Google Chrome. I'm pretty sure you are referring to a known bug. See this bug which was merged into this bug.
What steps will reproduce the problem?
- Visit site with /favicon.ico (e.g. facebook.com)
- Receive a redirect from this domain to a new domain without a /favicon.ico
- The favicon for the new url is inherited from the last domain.
What is the expected result?
Favicon is blank.
What happens instead?
Favicon is inherited from last domain.
Other information:
I discovered this as facebook.com does not link directly to external sites, but logs the url then redirects to it. I reproduced the issue on localhost using the 'redirect' statement in the ruby web-framework 'Sinatra'.
回答2:
Your browser stores the favicon and groups it with domain name of the site your visiting. In other words, once you've loaded facebook once, it will show up on all facebook pages.
来源:https://stackoverflow.com/questions/8935205/redirect-and-keep-my-favicon