Archive for the ‘javascript’ Category

Rails Caching And JavaScript Techniques

Monday, September 7th, 2009

Cross posted from darthsid

While implementing caching in a recent rails project I came across some typical caching issues. In a lot of pages the content is same for all users but certain components in them have user specific actions. As an example, I have a page listing all public messages that users have posted(similar to the public timeline in twitter) but actions on those messages are user specific(eg: only owner or admin can delete a message). Also, most of these actions use ajax and the rails authenticity token in them also gets cached resulting in subsequent failures if the session changes. Another issue was that the timestamps in most pages is fuzzy and they become irrelevant if a page gets cached for too long. I could have created separate caches for each user but if the user base really grows managing the caches would become a nightmare and that would still not solve the authenticity token and the timestamp problem. The simplest solution was to use JavaScript, more specifically jQuery.
(more…)

wanna add keyboard shortcuts to your web application?

Tuesday, April 24th, 2007

Today I was looking for some javascript to add keyboard shortcuts to my project. And after little search on google I came across a very cool and lightweight javascript library shortcuts.js .
This library allows you to make keyboard shortcuts on a fly.
Example:

Please visit this site to know more about this javascript library.

Animator.js: A javascript library by Bernie Sumption

Friday, November 3rd, 2006

While surfing on net I came across a javascript library(animator.js) based on prototype library written by Bernie Sumption.

I found this library a bit interesting. One that appeals me is the ability to define start state and end state through CSS

See in action here.