DEV Community

Discussion on: Promoting Perceived Performance with Prefetching

Collapse
 
raymondcamden profile image
Raymond Camden

Heya! Two questions for you:

1) "There are also a bunch of customization options. By default the library uses XHR to load all the links but you can ask it to use the fetch API and fall back on XHR:"

Any reason for this? I mean as a developer, I love Fetch. But as a user of this library, why would I tell it to use one over the other outside of needing support for older browsers? (Or is that it?)

2) "My local demo doesn't do the technique justice since everything locally loads quickly"

I assume you tested with network throttling in Chrome Devtools? That didn't show a change? If so I'd consider it a bug.

Collapse
 
remotesynth profile image
Brian Rinaldi

In answer to 1. No idea, since it falls back on XHR anyway. I had the same question myself.

As for 2, the page is a bit too simple that even with network throttling, it loads fast - as in, there seemed to be a difference between the preloaded and non-preloaded times but it was minor enough that I could have been imagining it...and since we are talking about perceptions here, it's hard to say definitively.