Questions tagged [bfcache]

20 questions
9
votes
5 answers

How to force Firefox to bypass BFCache for Angular.JS partials?

I'm working on an Angular.js page and making changes to an html 'partial'. Refreshing the page causes Firefox to correctly re-request the main html page from the server, but subsequent 'partial' templates that are rendered client-side are never…
GDorn
  • 8,511
  • 6
  • 38
  • 37
3
votes
1 answer

How to implement bfcache in Chrome so page returns to same DOM state after back navigation

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…
Cindy
  • 31
  • 3
2
votes
2 answers

Correctly handling the BFCache in react

I'm showing a loading screen (state) before redirecting to an external url (payment provider), since they tend to load for a while. If the user chooses not to complete the payment and goes history.back() (Gesture, back button, ...) the browser pulls…
Kimmax
  • 1,658
  • 21
  • 34
2
votes
0 answers

How to leverage Back-Forward Cache on popstate() event/fetch

Simple progressive enhancement, no framework, etc: /** enhance clicks on .xhr elements: */ window.addEventListener('click', function(e){ var t = e.target; if(t.closest('.xhr') || t.classList.contains('xhr')){ fetch( t.href, {} …
Hal
  • 537
  • 4
  • 13
2
votes
2 answers

pageshow event on Safari

I have the following simple JavaScript, which I require in order to re-initialise some variables on page reload, specifically when the page is served from the Safari BFCache: jQuery(window).bind('pageshow', function(event) { // I could inspect…
Matt Dunn
  • 5,106
  • 6
  • 31
  • 55
2
votes
0 answers

Firefox incorrectly caches AJAX calls in BFCache ignoring caching headers

We have a page that makes AJAX calls to get a JSON file. The JSON file has a 'max-age=60' header. On Firefox, the JSON file is incorrectly cached by BFCache beyond the 60 seconds specified by caching header. What is worse is that force-reloading…
tato
  • 5,439
  • 4
  • 31
  • 27
2
votes
0 answers

Extention to save original page state and restore to original state

I have a requirement to create a firefox addon where i need to save the state of a dynamically rendered page along with all the events. While interacting with page. the user might make multiple catalog selections using select option,check boxes…
1
vote
0 answers

Does next js support back forward cache (https://web.dev/bfcache/)

I am trying to add b/f cache in nextjs website, when we run (Test back/forward cache) in chrome browser, its run successfully "Successfully served from back/forward cache.". but when we redirect to other pages and going back it still loading…
Sonu verma
  • 11
  • 3
1
vote
1 answer

chrome Back-forward Cache disable because App Banner was present upon navigating away

chrome Back-forward Cache disable because App Banner was present upon navigating away. EmbedderAppBannerManager when I remove manifest.json its work fine
Mehran Motiee
  • 3,547
  • 1
  • 13
  • 16
1
vote
0 answers

Google Analytics Requests firing when Page is loaded from Safari's BFCache

I recently found out about BFCache and how it affects web analytics tools. To find out how big of an issue this is on my website, I implemented the solution from web.dev. I added a custom dimension to see if a pageview is fired through this new…
1
vote
0 answers

Q: The previous page is refreshed when browser back of PhantomJS ? can prevent refresh by back foward cache disabled?

I executed acceptence test with using capybara + poltergeist + phantomjs. My test environment like this phantomjs: stable 2.1.1 capybara (2.15.1) poltergeist (1.13.0) I simulated the browser back button in Capybara like this code. step 'I go back…
Kouta Osabe
  • 121
  • 1
  • 10
1
vote
1 answer

How to save/cache the dom so that the page loads as-is when you hit the back button?

i add models to my js app model collection using ajax calls. when i click a model and go to the next page, i want all the models i had loaded to still be there when i hit the back button. what is the best way to do this so that it works on all…
1
vote
0 answers

Disable caching of content in firefox offline mode

I am working on a web application which has user management in place. I find a concerning issue in firefox related to Work Offline. Following are the steps describing the scenario: User logs in to the application User performs some action and logs…
Vaibhav
  • 569
  • 6
  • 31
0
votes
0 answers

BFCache in iOS WebView

Google writes that BFCache doesn't work in Android WebView: Chrome is not planning to enable back/forward cache for Android WebView due to associated complexities. What's about Apple? Is it possible to enable back/forward cache (Page Cache)…
Ilya
  • 93
  • 1
  • 1
  • 4
0
votes
0 answers

bfcache eligible for my site but still not working

I have a site in xampp localhost and it will setup a domain using windows vhosts myproject.com. When i will run the chrome bfcache then it says Successfully served from back/forward cache. (included screenshot). But when i want to try back or…
1
2