branperr
branperr

Reputation: 514

NextJS Browser Back Button Not Using BFCache?

I'm using NextJS 14 for my app and I want to have this behavior:

However, I'm running to an issue getting this to work. I can have the previous state maintained if I use the <Link> component, but then it doesn't do a full page load. If I use the <a> tag, I get the full page load, but instead of the page being loaded from the bfcache, it makes another request to the server.

Is there any way I can fix this? Apologies if anything doesn't make sense, I don't have the best mental model of it.

Upvotes: 4

Views: 1297

Answers (0)

Related Questions