goodeggs / bites

Technical morsels
http://bites.goodeggs.com
8 stars 4 forks source link

Working around bfcache #4

Open makebbekus opened 10 years ago

makebbekus commented 10 years ago

This would be a short post about handling the bfcache in mobile browsers. For perceived performance we put a spinny on the page before links take you to slower loading pages. When you use the browser back button you get the whole previous page from cache including the spinny. Not ideal. The solution is to listen for onpageshow and check if the event has the attribute persisted.