I came across this clever thing for making a website seem faster to user. This is pretty clever since a lot of what makes a computer “seem” fast is the way it responds to the user moreso than how fast it is.
I recall this was an early Apple Macintosh trick – make *something* happen right away when the user interacts so that it seems like the computer is working on the thing. This pleases the user more than actually getting to the work. The comparison at the time was to what Windows would do which is “lock up” and get stuck working on the thing and then eventually inform the user.
Does this matter? It *should* and stuff. And apparently there are studies that say so. In real life, I shop regularly at amazon.com, target.com, and gap.com and all of them are frustratingly slow — sometimes in the ballpark of 10 seconds to load a page with a lot of products on it (or in amazon’s case a lot of ads for additional products) on it. All these companies seem to be raking in the dollars, so who knows? Maybe it’s just my aging laptop is slow.
Is it safe to link to the code the way the author suggests? I don’t know. Seems safe, but I have no idea who this guy is. He says it’s hosted on Cloudflare in some unhackable way, but if someone broke into his account and/or he turned evil then you are loading someone else’s script onto your site and letting it do whatever. That doesn’t sound good.
One could copy the code to their own server and link to it like that, which might improve the safety on that end. I think. At least depending on who you trust more.
It says it is easy to install – just add this code to your site just before </body>. I had read it as before </head> and now that I’m writing about it I realize that’s not what it actually says. I’ll have to look around to see if there is an easy way to do this without modifying theme files.
A lot of this is all so “I don’t know anything at all on the topic” — but it is interesting and something I haven’t seen talked about before.
This is all it takes to add it to your website. Please see the instant page website for exact details, I’m just repeating the code so you can see how easy it is to implement:
Put this HTML snippet just before </body>:
<script src="//instant.page/1.1.0" type="module" integrity="sha384-EwBObn5QAxP8f09iemwAJljc+sU+eUXeL9vSBw1eNmVarwhKk2F9vBEpaN9rsrtp"></script>
Go here for all the details
I installed the plugin Woody snippets by William Bontrager. That’s a name I remember from the early internet days and I suspect I was subscribed to the WIllmaster Possibilities newsletter to my aol.com email address. Maybe I’m even still subscribed?
There is a little weirdness in that the website for the plugin does not mention WIlliam Bontrager at all. That’s that thing with WordPress plugins can be acquired by other parties who aren’t the person you thought was making the plugin… another rant coming.
This plugin made it easy to add the instant.page snippet before the </body> tag. Checking on it, it seems like I have a lot of stuff before the </body>, but this snippet is now there too.
So you can see what this does right here on this site. Note that the site also currently uses the W3 Total Cache plugin. So there may be some differences depending on whether you are trying to get a page that has already be created for the cache or not. I’m not sure how that works other than if you load a page once then it should have a cache built until it expires or I change the site (then again, maybe YOUR browser is cacheing the page too?).
There are probably a LOT of ways to get that snippet in before the <body> tag.
Adding a code snippet with a Code Snippets plugin is a possibility (which I thought I had installed, but apparently NOT in this site — oh man, another rant! Every WordPress install is it’s own unique install with different plugins and settings!
– a frustrated Eric Shefferman on 2019-02-16
Every WordPress install is it’s own unique install with different plugins and settings!
Plus I found some reference on inserting stuff with WordPress hooks. So some links to let you surf forever:
This talks about the functions.php file
How to add code to just before closing body tag
How to Add Code to WordPress Header and Footer
This looked like it would also insert stuff, but the author is in some kind of fight with Yoast and that’s a whole ‘nother rant about WordPress so I used the Woody one instead.
Is this site faster?
Maybe? Do you think it’s fast?
It’s hosted on a basic “Package 3” shared hosting account at pair.com for $17.95 per month.
Enjoy 20% off your first pair Networks bill! Use code:
The kind of question that I have no idea how to answer:
HA! And the “Update” button crashed with the “autosaving” or whatever stupid stuff and ate whatever else I was writing. Enough WordPress rants for one day. So tired.