toxic-johann / toxic-johann.github.io

my blog
6 stars 0 forks source link

bfcache的一些坑 #3

Open toxic-johann opened 7 years ago

toxic-johann commented 7 years ago

bfcache 其实存在挺久的了,但是可能很多人都不知道他是什么。

具体的文章可以看这个联合。这里我只截取一些部分。

Firefox 1.5 uses in-memory caching for entire Web pages, including their JavaScript states, for a single browser session. Going backward and forward between visited pages requires no page loading and the JavaScript states are preserved. This feature, referred to by some as bfcache (for "Back-Forward Cache"), makes page navigation very fast. This caching state is preserved until the user closes the browser.

这其实是个很好的举措。尤其在移动端,因为用户的网络环境比较差。如果在前后切换的时候需要重新加载一次网页的话会产生很多无用的 loading 。

toxic-johann commented 6 years ago

http://robinski.org/bfcache/test_select2.html 测试页面