Sunday, 19 February 2012

CloudFront Invalidator | Wildcards, Resubmission and Credentials Saving

While I had a lot of fun writing my little tool up, it was not too heartening to see that my hours of work almost seemed rather useless.

Today however, I was able to get some motivation thanks to Toby who was the first user to comment on my little tool.

Toby had two suggestions:

  • Wildcard path submissions
  • Re-submitting previous invalidations

I immediately set off on a mission to get them done.

Monday, 13 February 2012

Blogger | Statistics with AJAX

Blogger has been receiving numerous updates in the past few months, mainly in the new templates called Dynamic Views. I first rejected the option seeing how little customisability it offered, but it seems like my own template is quickly converging towards what Google's Dynamic Views is like in its core: full of JavaScript and depending on the blog's RSS feed.

I started my journey by writing some JavaScript which would let users navigate through pages without having the page refresh fully via some AJAX calls and DOM replacement.

The instant search, with a scrollable results box
Then I designed the top bar that you can see floating above this post and thought how nice it could be if I could have a semi-instant search (Blogger's search is quite slow). I then thought of a way which involved downloading the RSS feed for the blog, and parsing all text in the feed. I wrote an occurrence based points algorithm which allows for basic search.

Back when I was implementing the instant search, I found that with the RSS feed in my hands, I could load full pages as well! This would allow me to flick through pages on my site almost instantly.

This week, I got around to doing that very job, and if you navigate around a little bit, you will see that page loads are almost instant.

There was one problem though, Blogger statistics were not getting updated...