Show HN: Make your site’s pages instant in one minute
301–310 of 361 posts
Re: Show HN: Make your site’s pages instant in one minute
#302It would be great to deploy this on hacker news itself, at least on the "see comments" link of the main page. Page-loading is already blazingly fast, but my latency is still a bit high as I use a mobile internet connection.
Re: Show HN: Make your site’s pages instant in one minute
#303Earlier quoted context omitted.
You could obviously do it with JavaScript by pinging the server to tell him that log entry X is to be promoted to a true "hit". For a non-JS solution, I guess an tiny iframe at the bottom of the html page that accesses a special server page with an unique stamp that causes the same "hit". the iframe loading would mean that the rest of the page is mostly loaded before it was closed.
> For a non-JS solution How do you use this library with JS disabled?
Re: Show HN: Make your site’s pages instant in one minute
#304Re: Show HN: Make your site’s pages instant in one minute
#305Live 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. :/
Re: Show HN: Make your site’s pages instant in one minute
#306Earlier quoted context omitted.
ditto. It works on Chrome though (sigh)
Why the sigh? It says right on the site that this gracefully degrades on browsers that don’t support it. Why is it a problem making a site faster in a browser designed for speed, if it does not degrade the experience at all in all other browsers?
Re: Show HN: Make your site’s pages instant in one minute
#307Earlier quoted context omitted.
Lots of people in this thread confusing “idempotent” with “safe” as specified in the HTTP RFC: https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
FWIW RFC 2616 was obsoleted by the newer HTTP/1.1 RFCs: https://tools.ietf.org/html/rfc7231#section-4.2
> In particular, the convention has been established that the GET and HEAD methods SHOULD NOT have the significance of taking an action other than retrieval. These methods ought to be considered "safe".
(there's an exception listed too, but doesn't apply to logout)
EDIT: I know of someone who made a backup of their wiki by simply doing a crawl - only to find out later that "delete this page" was implemented as links, and that the confirmation dialog only triggered if you had JS enabled. It was fun restoring the system.
Re: Show HN: Make your site’s pages instant in one minute
#308Earlier quoted context omitted.
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.
Also: sometimes a site is misbehaving (for myself, or maybe for a user we're helping) and it's helpful to directly navigate to /logout just to know everyone is rowing in the same direction. Using a POST, especially if you're building through a framework that automatically applies CSRF to your forms, forecloses this possibility (unless you maintain a separate secret GET-supporting logout endpoint, I guess).
Re: Show HN: Make your site’s pages instant in one minute
#309Earlier quoted context omitted.
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. :/
But how do you know it's still fresh?
Re: Show HN: Make your site’s pages instant in one minute
#310Live 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. :/
If you really care about speed anyway, you should already have setup your site to max out caching opportunities (Etag, Last-modified, and replying "not-modified" to "if-modified-since" queries) - I'd suggest the author should ensure the script does support caching to the broadest extent possible - hitting your site whenever appropriate.