Live data from Hacker News

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

instant.page

311–320 of 361 posts

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

#311
post #279

Earlier quoted context omitted.

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 butto…

That brings me back to the year 2001, when my boss's browser history introduced Alexa to our admin page and they spidered a bunch of [delete] links. cough cough good thing it was only links from the main page to data, and not the actual data. I spent the next few days fixing several of problems that conspired to make that happen...

As in, anybody with a link to /delete could delete things? No identification/authentication/authorization needed?

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

#312
The downside to this would be hovering over a document list, where you might pass by 15 records, GETting them all, until you click the one you really wanted.

But it is a clever idea. Applied carefully, it could give the impression of a speedier site. Of course, I see no reason to need a 3rd party for this... updating event handlers to operate this way shouldn't be outside the abilities of most web developers.

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

#314
post #240

Earlier quoted context omitted.

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.

[deleted]

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

#315
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?

It doesn’t send the response to the client, but it still does all the work of generating the response.

I use nginx to proxy_pass to django+gunicorn via unix socket. I sometimes see 499 code responses in my nginx logs which I believe means that nginx received a response from the backend, but can’t send it to the client because the client canceled the request.

I admit I haven’t actually tested it directly, but I’ve always assumed the django request/response cycle doesn’t get aborted mid request.

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

#316
post #292

Live demo on my website @ https://sysadmincasts.com/ Temporary added it in-line for testing. I was already in the sub 100ms level but this just puts it over the top! Also updated all admin add/edit/delete/toggle/logout links with "data-no-instant". Pretty easy. Open developer preview and watch the network tab. Pretty neat to watch it prefetch! Thanks for creating this! ps. Working on adding the license comment. I str…

If I mouse-over the same link 10 times, it looks in my network tab like it downloads the link 10 times. I'd expect this preload script to remember the pages it's already fetched and not duplicate work unnecessarily. :/

Set your http cache headers correctly to instruct the client to save and re-use pages it downloads.

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

#317

Live demo on my website @ https://sysadmincasts.com/ Temporary added it in-line for testing. I was already in the sub 100ms level but this just puts it over the top! Also updated all admin add/edit/delete/toggle/logout links with "data-no-instant". Pretty easy. Open developer preview and watch the network tab. Pretty neat to watch it prefetch! Thanks for creating this! ps. Working on adding the license comment. I str…

Very impressive! Wonder if it'd be worth rerouting some of the paginated URLs like the episodes `?page=4` to `/page-4` or something like that. :shrug: - either way, looks like you had some fun optimizing it!

/page/4 would probably be more prudent

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

#318
post #112

Earlier quoted context omitted.

Jesus. I hope they pay you well for that. I've heard a lot of stories of ridiculous rule-by-HR culture, but that's so extreme it sounds made up.

I don't think it's made up, because I experienced the same thing in a pretty well-known European research center... Of course, had I known about these practices in advance, I would have declined the job offer. But I didn't. I ended up quitting a few weeks later anyway. IT would monitor all connections from all employees and send a report to upper management with summary statistics, on a monthly basis. I was told this…

So they asked you you are surfing the web on a insecure protocol that can compromise internal data ?

Couldn't you just say "I just dont use http anymore because this X company data is very valuable to me" ?

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

#319
post #135

Earlier quoted context omitted.

This phrase "GET link" I keep seeing makes sense, but strikes me as odd. Is that to differentiate from an "a" tag that triggers JS that makes a fetch/xhr with another method? The only non-JS non-GET request I'm aware of is a form action (POST by default, GET if specified) which can hardly be called a link, unless I'm wrong to equate link with "a" tag.

Form actions are actually GET by default (think search forms). You need to explicitly use for a POST form.

Ah, yep.

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

#320

Earlier quoted context omitted.

Added bonus: these extra pre-loads on hover will tell you if someone nearly clicked a link. Your web server logs contain some poor-man's eye tracking. Could aid determining if important parts of your pages (warning messages and so forth) gather enough attention.

Seems like an invasion of privacy. I'd be surprised if someone hadn't used this sort of script for this already. Perhaps browsers or ad blockers will block this feature in the future.

There's already other libraries out there like Fullstory, which tracks all the user mouse movements and interactions with the page and allows you to watch a user interact with your site in nearly realtime.
Post reply on HN