Live data from Hacker News

Show HN: Make your site’s pages instant in one minute

instant.page

251–260 of 361 posts

Re: Show HN: Make your site’s pages instant in one minute

#252

Nice idea for HTTP/1.x, however, isn't this what HTTP/2.0 [1] is meant to achieve by pushing components at the user? 1: https://en.wikipedia.org/wiki/HTTP/2_Server_Push

The main difference being that instant.page respects users' data allowances by prefetching only resources that it thinks the user intends to load. You could combine it with H2 push and/or prefetch response headers to improve the load times even more :)

It probably respects their data allowances even less, considering it completely re-fetches the page every time you hover over the link.

Re: Show HN: Make your site’s pages instant in one minute

#254
post #240

Earlier quoted context omitted.

Client side canceled doesn’t necessarily translate to server side canceled. I used to use a preload-on-hover trick like this but decided to remove it once we started getting a lot of traffic. I was afraid I’d overload the server.

I'd also hesitate wasting resources in such a way. About your first statement though, which server software do you use that still sends data after the client has closed the connection? Doesn't it use hearbeats based on ACKs?

The server is still doing all of the work in its request handlers regardless of whether client closed the connection.

Re: Show HN: Make your site’s pages instant in one minute

#256
post #209

Earlier quoted context omitted.

Minification is free and is done only once. In our case, the script is .9kb compressed (2.9kb uncompressed). When minified, it goes down to .6kb compressed (1.1kb uncompressed). It’s a small improvement, but there’s no reason to ignore it.

Saves over 50% of bandwidth ... "it's a small improvement". ^_^

They mean the 300 bytes shaved from gzip to minified+gzip.

Both are under MTU size of TCP packet.

Re: Show HN: Make your site’s pages instant in one minute

#257
post #228

Earlier quoted context omitted.

OP’s point was that logout should not be implemented with a link/GET but instead with a button/POST for exactly this reason.

A logout action is idempotent, though. You can't get logged out twice. In my opinion, that's the use case for a GET request. I just checked NewRelic, Twilio, Stripe and GitHub. The first 3 logged out with a GET request and GitHub used a POST.

Idempotency has nothing to do with it. Deleting a resource is idempotent as well. You wouldn't do that via GET /delete

A GET request should never, ever change state. No buts.

Just because a bunch of well known sites use GET /logout to logout does not make it correct.

Doing anything else as demonstrated in this and other cases breaks web protocols, the right thing to do is:

GET /logout returns a page with a form button to logout POST /logout logs you out

Re: Show HN: Make your site’s pages instant in one minute

#259

Earlier quoted context omitted.

I've seen this kind of features several times on libs. And sometimes I can't un-think about it while my mouse is hovering on links in normal life. It's .. prefetching or not?

Hmm, I wonder: if the user isn't asked to authorise the action whether it technically breaches the Computer Misuse Act (UK). If you send a requested page, that's obviously fine. Normal use of websites is expected, but unilaterally instructing your site visitor's browser to download further unrequested content that's not part of a requested resource ...?

What about downloading tracking js you didn't ask for then?

Re: Show HN: Make your site’s pages instant in one minute

#260

This is a good optimization. However, it is like pushing the mud under the carpet. It’ll hide real problem. I would rather fix the root cause of slow rendering pages and then use this trick to make it better.

I think it _could_ be used that way. If used properly, however, you’d make sure all your other ducks are in a row before using something like this as icing on the cake, so to speak.

But you make an important point.

Post reply on HN