Content never loads if prefetching fails
See original GitHub issueIt appears that react-static
has buggy or non-existent recovery after failure when preloading resources.
To Reproduce Steps to reproduce the behavior:
- Open a
react-static
site. For example, react-static.js.org. Let the page load. - Turn off your connection (turn off wifi or click “offline” in devtools > network)
- Click “Documentation” or “Get Started!”
- The content has preloaded and should show up despite your network being offline. However, it tries to preload additional content, which fails (you can see errors in the console).
- Turn on your connection again.
- Click e.g. “Changelog” in the sidebar navigation.
- You get a 404 page even though you have a working connection and should be able to fetch the content.
Expected behavior
I expected react-static
to try to fetch the content again if it failed. With the current behavior, the only way for users to recover is to do a “full” refresh of the page.
I believe it might possible to work around by importing axios
and using interceptors, but it really seems like that should not be needed?
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
3041 - DNS pre-fetching causes frequent internet loss - Monorail
spinner never stops. I'm using Windows 7 64bit and Google Chrome dev channel v. 4.0.249.11. Now here's the kicker, and why I think...
Read more >Content Pre-fetching Best Practice - AT&T Developer
Content Prefetching looks at how prefetching works, describes some issues involved in content management, and provides recommendations for how to use ...
Read more >Prefetching, preloading, prebrowsing - CSS-Tricks
A new spec called preload suggests that sometimes it's best to always download an asset, regardless of whether the browser thinks that's a...
Read more >The problem with prefetch - LWN.net
Prefetching is useful when you actually know you'll be doing sequential accesses (still only if you do it on background). This is almost...
Read more >When Prefetching Works, When It Doesn't, and Why
If prefetched blocks by software prefetching hide a part of one or more streams, the hardware prefetcher will not be trained properly. Also,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is fixed in the next version. Try the beta!
On Sat, Dec 8, 2018 at 12:40 PM Dragomir Ivanov notifications@github.com wrote:
As of right now, I don’t not know of a way to fix it in v5 without introducing a major overhaul of how the v5 components work. And it would likely be a breaking change. I’m open to discuss it though.