InstantClick

See


http://instantclick.io/

I just added this to one of my sites (more to come) and this is both super-cool and super-easy to setup.

1 Like

I have added it to my blog:

It’s mostly in Norwegian - but you can feel the speed! It’s most impressive on the desktop/laptop with an actual mouse or scrollpad (mouseover).

Wow. @bjornerik that’s pretty impressive. I’m at a conference with s…l…o…w… Internet and your site is the only one that felt peppy. I’ve gotta implement this.

Yea, it was very easy to add.

It has broken my Facebook like-button - but I guess I have to fix that; it’s no going back. All the other Javascript stuff works fine (not much, I’ll admit).

I added it to my site too, and it works well. Thanks for the tip!

I noticed my TOC on various pages is not working - when I click a TOC link, it simply jumps to the top page.

I jumped to the conclusion that this might be due to instantclick, but apparently not. Disabling instantclick completely, it still occurs.

For the record, I added the recommended changes to my google analytics code per the recommendation here: http://instantclick.io/scripts

{{ "<!-- ENTERING partial headend.html -->" | safeHTML }}
{{ if not .Site.BuildDrafts }}
{{ if .Site.Params.googleAnalytics }}
<script data-no-instant>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', {{ .Site.Params.googleAnalytics }}, 'auto');
  InstantClick.on('change', function() {
    ga('send', 'pageview', location.pathname + location.search);
  });
  InstantClick.init();
</script>
{{ end }}
{{ end }}

{{ .Site.Params.headercommentblock | safeHtml }}

{{ "<!-- LEAVING partial headend.html -->" | safeHTML }}