justforeverus asked: HI, I'm a web developer and the co-founder of Essence Labs Creative Agency. I just wanted to give you a little idea that popped into my head when reading the post about the tumblr api. You should try making a static page that automatically fetches posts using ajax and the v1 tumblr api, and then have that be placed in a random order. That might work better than the cron job so this way each user gets a different page. Don't know if it will work too well, but its worth a shot! What do you think?

The issue with AJAX and the Tumblr API is the cross-site domain restrictions in browsers.  The main page is at “foo.tumblr.com” and the information is at “api.tumblr.com”.  Firefox and Chrome won’t allow cross-subdomain AJAX calls like this.

You *can* use JSONP as a workaround for the cross-site scripting issue, but I find it inelegant and ugly.

But more to the point, when you need to load possibly hundreds of posts, the Tumblr API server is just too slow to get the results on the page in a reasonable amount of time.

Experiments from my webserver (which has a super duper fast pipe) shows an average of over 2.0 seconds to load 250 posts from the Tumblr API.  This slows to over 3.5 seconds on my personal computer and home internet line.  This is just too slow.

On the other hand, I can pre-emptively download the information from the API, extract what I need, cache the result in a “static” JavaScript file on my webserver and deliver it to the end client in just 100’s of milliseconds.  And so this is how I plan to solve this problem, using the Tumblr static “Pages” to load a specially generated JavaScript file (or JSON or whatever) with the required “shuffled post information” and display it with a tiny amount of JavaScript.

This offers a better end experience to users.

Thoughts?

On Tuesday Night, my house caught fire.  Everyone in my family is OK but a lot of our stuff is totally ruined. As you can imagine, this is very stressful. We’re staying with my uncle & aunt for now, but I have very limited internet access here.  I will update everyone as soon as I can.

I added a few new updates / features to my Basic Tumblr Tag Cloud:

  • Added the ability to change the “case” of your tags to Lower-case, Upper-case, and Title-case for display purposes.

  • Improved the default “Alphabetical” sorting code to better handle non-English Latin-script languages.

  • Added “language” option to specify a language “locale”, which can improve Alphabetical sorting and Case transforming on Tags for many languages, including non-Latin-script languages.

These additions (and some other new neato new things) will also be added to the “Pretty” Tag Cloud in the next few days.

Also, I can always use more feedback from people. Please?