Menu

Loading one 13 KB page on our site fetches 37 KB of pages nobody asked for, in 21 requests for 7 destinations
📰

Loading one 13 KB page on our site fetches 37 KB of pages nobody asked for, in 21 requests for 7 destinations

DEV Community: nextjs·Daniel Pertu·about 13 hours ago
#2QVZsfIA
#devtonextjs#devto#dev#_rsc#bytes
Reading 0:00
15s threshold

Our marketing site is 72 URLs, almost all of them prerendered, with a header and a footer that link to the same handful of hubs from every page. It is about the most boring hosting situation there is, which is why I was surprised by what one page load actually costs.

I opened one of our guide pages with the HTTP cache disabled and read performance.getEntriesByType('resource') back out:

What Requests Bytes over the wire

The page itself 1 13,107 (78,764 decoded)

JavaScript chunks 19 379,011

Prefetches of other pages 21 36,941

The page that was asked for is 13 KB compressed. The pages that were not asked for are 37 KB, which is nearly three times as much, in 21 separate requests.

21 requests, 7 destinations

Every one of those 21 URLs is distinct, and every one was fetched exactly once.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.