PHP webdeveloper and frontend developer

jQuery HTML5 Twitter plugin for iPad using Localstorage

Category : Web development · by Apr 13th, 2013

I wrote a small jQuery plugin that gets it’s parameters from html 5 data attributes, so configuration is simple. It needs some cleanup but I’ll do that later 😉

You can download a zip of the files

You can add 3 html5 data attributes to configure the plugin:

data-twitter-username (required / used to set the username)
data-twitter-tweet-count (optional / the amount of tweets returned -> Default is 5)
data-twitter-element-id (optional / you can specify a different element to apply the tweets to)


 Here’s a full example:

Because the Twitter search API limits unauthenticated API calls to 150 an hour for every public facing IP. OAuth API calls are permitted 350 calls an hour. You can check how many Twitter API you have  left this hour by going to

This will return the remaining calls and when the remaining hits will be reset formatted in JSON.

Twitter search API rate limit check

Because of that limitation I used localstorage in the plugin which stores a cached version there. So it will only work on browsers that support Localstorage. iPads support Localstorage. I set the localstorage lifetime to 15 minutes in the variable localstorage_lifetime. You can change its value if you want to (you need to convert it to milliseconds first). This is an example of the output of the plugin

jQuery html 5 twitter plugin (steven dobbelaere)

Download the plugin


(1) Comment

6 years ago · Reply

Hey! I could have sworn I’ve been to this site before but after reading through some of the post
I realized it’s new to me. Nonetheless, I’m definitely delighted I found it and I’ll be bookmarking and checking back often!

Leave a Reply

Your email address will not be published. Required fields are marked *