solana-labs / explorer

Explorer for Solana clusters
https://explorer.solana.com
MIT License
233 stars 291 forks source link

Page data should be sourced from local cache when pressing back button (if not the entire page from the bfcache) #297

Open steveluscher opened 1 year ago

steveluscher commented 1 year ago

Describe the bug When you click back to visit a page that you have already been to, we fetch data anew. This contributes to folks blowing the rate limit on the RPC and getting 429 HTTP errors.

To Reproduce Steps to reproduce the behavior:

  1. Visit an account page
  2. Click on a transaction
  3. Click the back button

Expected behavior No network requests should be made when you return to the account page in a short enough amount of time.

Additional context This is probably a massive amount of work that should start with the complete reimagining of how we fetch data in the Explorer. All of the things that next.js gives you for free in terms of caching, we don't get, and we need to examine what it is about our architecture that opts us out of that default.