Live data from Hacker News

A super fast website using Cloudflare workers

crazyfast.website

21–30 of 83 posts

Re: A super fast website using Cloudflare workers

#22
post #16

> First visit: ~30ms. Real JavaScript executes at the edge. It appears to have static content. Why does it need any JS at all?

"At the edge" means "on a server located close to where you are". It's used to serve the HTML.

Looks like the only JavaScript running on the client is for installing the service worker and some Cloudflare tracking junk.

Re: A super fast website using Cloudflare workers

#23
post #12

Earlier quoted context omitted.

But now it's that fast from almost everywhere on the planet, with nearly zero effort from the developer. We've been limited by light speed here, not compute.

I get 381ms/401ms on first load and not the claimed ~30ms. I'm not really sure what the point is here though. CDNs and browser cache headers work? Static sites are fast to paint?

Yeah, I'm not seeing fast uncached times either. I usually hit Cloudflare's Miami datacenter, which is only about 200 miles and very low latency. But I'm seeing 200+ms on this site right now.

Re: A super fast website using Cloudflare workers

#24
post #16

> First visit: ~30ms. Real JavaScript executes at the edge. It appears to have static content. Why does it need any JS at all?

"At the edge" means "on a server located close to where you are". It's used to serve the HTML. Looks like the only JavaScript running on the client is for installing the service worker and some Cloudflare tracking junk.

Right, but any old CDN can do that. Why does it need CF workers?

Re: A super fast website using Cloudflare workers

#25
post #17

another trick is adding speculation rules on MPA sites. so when you hover over a link the page gets prerendered. For example, my initial page takes ~80ms, but navigating to other pages take 20ms prerender: [ { where: { href_matches: '/*' }, eagerness: 'moderate' } ] That doesn't work on Safari, FF, and Brave, but you could do something like this: https://github.com/ericfortis/mockaton/blob/main/www/src/_as...

Most adblockers/privacy extensions disable this.

uBlock Origin does it by default for instance.

Re: A super fast website using Cloudflare workers

#26
post #16

> First visit: ~30ms. Real JavaScript executes at the edge. It appears to have static content. Why does it need any JS at all?

"At the edge" means "on a server located close to where you are". It's used to serve the HTML. Looks like the only JavaScript running on the client is for installing the service worker and some Cloudflare tracking junk.

Workers doesn’t require JS to serve static content though. You upload it as a static asset and it does it for you.

Re: A super fast website using Cloudflare workers

#27
post #24

Earlier quoted context omitted.

"At the edge" means "on a server located close to where you are". It's used to serve the HTML. Looks like the only JavaScript running on the client is for installing the service worker and some Cloudflare tracking junk.

Right, but any old CDN can do that. Why does it need CF workers?

[deleted]

Re: A super fast website using Cloudflare workers

#28
post #17

another trick is adding speculation rules on MPA sites. so when you hover over a link the page gets prerendered. For example, my initial page takes ~80ms, but navigating to other pages take 20ms prerender: [ { where: { href_matches: '/*' }, eagerness: 'moderate' } ] That doesn't work on Safari, FF, and Brave, but you could do something like this: https://github.com/ericfortis/mockaton/blob/main/www/src/_as...

Most adblockers/privacy extensions disable this. uBlock Origin does it by default for instance.

Do they block completely?

On Brave, the workaround on that linked snippet bypasses their blocking.

Post reply on HN