A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vuejs/vue/issues/8109 below:

在ios的safari上bfcache失效 · Issue #8109 · vuejs/vue · GitHub

Version

2.5.16

Reproduction link

https://github.com/wen911119/vue-bfcache-bug-report

Steps to reproduce

1.git clone
2.npm install
3.npm start
4.用iphone的safari浏览器打开页面
5.滑动一下列表
6.点击跳转到下一页按钮
7.在下一页滑屏返回

What is expected?

在滑屏返回后从bfcache读取页面。页面生命周期不会再次触发,列表也保持在原来位置。

What is actually happening?

onpageshow事件的event.persisted属性为false,说明没有从缓存读取。页面的mounted被重新触发了,列表回到了顶部。

一直用的vue,这个bug我原以为是safari设计的不好。直到今天试了下react,发现react没有这个问题。才意识到这个是vue的问题,作为对比,我也用react创建了个一样的测试例子。https://github.com/wen911119/react-bfcache-test

guAnsunyata, mlie-lh, haodaking, wjf563745940, xyyjk and 2 more


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4