3

I’m trying to make Chrome implement bfcache (back-forward cache), which “stores the current state of the DOM in memory. When a page is re-visited via the back button, no requests are made. The DOM itself is served straight up from cache.” My understanding is that both Safari and Firefox use some form of bfcache, but not the current version of Chrome. Basically, I want a few simple jQuery animations to resume where they left off after navigating back to the page after clicking on a link. They work as intended in Safari, but not in Chrome. Here is the basic script I want to freeze and resume upon back navigation:

var soundControl = document.getElementById(“song”); 
  $(“#song”).get(0).play();

$(‘div.a img’).fadeIn(500);
$(‘div.b img’).delay(750).fadeIn(500);
$(‘div.c img’).delay(1500).fadeIn(500);
$(‘div.d img’).delay(2250).fadeIn(500);

The solution may involve adding an EventListener or using the persisted property, but I’m not sure.

Cindy
  • 31
  • 3

1 Answers1

2

Fast forward to 2019 - Chrome is actually testing bfcache implementation. The works are still in progress and expected to be released next year (2020)

https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/OVROmzNUng0/1gTmi-I3EQAJ

mehulmpt
  • 15,861
  • 12
  • 48
  • 88