background preloader

jStorage - simple JavaScript plugin to store data locally

jStorage - simple JavaScript plugin to store data locally
jStorage is a cross-browser key-value store database to store data locally in the browser - jStorage supports all major browsers, both in desktop (yes - even Internet Explorer 6) and in mobile. Additionally jStorage is library agnostic, it works well with any other JavaScript library on the same webpage, be it jQuery, Prototype, MooTools or something else. Though you still need to have either a third party library (Prototype, MooTools) or JSON2 on the page to support older IE versions. jStorage supports storing Strings, Numbers, JavaScript objects, Arrays and even native XML nodes. jStorage also supports setting TTL values for auto expiring stored keys and - best of all - notifying other tabs/windows when a key has been changed or publishing/subscribing to events from the same or another tab/window, which makes jStorage also a local PubSub platform for web applications. jStorage is pretty small, about 7kB when minified and 4kB gzipped. Donate

http://www.jstorage.info/

dojox.storage Welcome to the Dojo Toolkit API documentation. You are browsing version 1.5 of the Dojo Toolkit. Use the selector to the left to change versions. To find the object you're interested in, use the tree to the left...or use the quick links below. To print the documentation, simply navigate to the object of your choice and hit Print. Advanced Debugging With JavaScript When used effectively, JavaScript debuggers help find and squash errors in your JavaScript code. To become an advanced JavaScript debugger, you’ll need to know about the debuggers available to you, the typical JavaScript debugging workflow, and code requirements for effective debugging. In this article, we’ll discuss advanced debugging techniques for diagnosing and treating bugs using a sample web application. On accessibility#section1 This article highlights strengths and differences between debugging tools, and shows how we perform advanced JavaScript debugging tasks. Our methods often rely on the mouse; if you prefer to use keyboard shortcuts, or if you rely on assistive technologies such as screen readers to interact with these tools, you should consult the relevant documentation to determine how (or if) these tools will work for you.

Creating HTML5 Offline Web Applications with ASP.NET The goal of this blog entry is to describe how you can create HTML5 Offline Web Applications when building ASP.NET web applications. I describe the method that I used to create an offline Web application when building the JavaScript Reference application. You can read about the HTML5 Offline Web Application standard by visiting the following links: jQuery Events: Stop (Mis)Using Return False Probably one of the first topics covered when you get started learning about jQuery events is the concept of canceling the browser’s default behavior. For instance, a beginner click tutorial may include this: This function toggles the hiding and displaying of #mydiv, then cancels the browser’s default behavior of visiting the href of the anchor tag. It is in these very first examples that bad habits are formed as users continue to use return false; whenever they want to cancel the default browser action. I am going to cover two very important topics in this article relating to the canceling of browser events: Use the right method for the job: return false vs. preventDefault, stopPropagation, and stopImmediatePropagationTop, bottom or somewhere in the middle: where in the event callback should you cancel default behavior?

Sizing and Positioning Fancybox You’ve probably seen Fancybox all over the place. In a way, it’s the living-successor of ThickBox and Lightbox. I was recently on a project where I had to both size and place it. Sizing it is easy. Performance:Leak Tools Strategy for finding leaks When trying to make a particular testcase not leak, I recommend focusing first on the largest object graphs (since these entrain many smaller objects), then on smaller reference-counted object graphs, and then on any remaining individual objects or small object graphs that don't entrain other objects. Because (1) large graphs of leaked objects tend to include some objects pointed to by global variables that confuse GC-based leak detectors, which can make leaks look smaller (as in bug 99180) or hide them completely and (2) large graphs of leaked objects tend to hide smaller ones, it's much better to go after the large graphs of leaks first. A good general pattern for finding and fixing leaks is to start with a task that you want not to leak (for example, reading email). For example, start with bringing up the mail window and closing the window without doing anything.

Extreme JavaScript optimization 2010 update: Lo, the Web Performance Advent Calendar hath moved Dec 20 This article is part of the 2009 performance advent calendar experiment. Today's article is a second contribution from Ara Pehlivanian (here's the first). There's a Belorussian translation provided by Patricia. Thanks! Ara Pehlivanian has been working on the Web since 1997. ColorBox, A jQuery Lightbox A lightweight customizable lightbox plugin for jQuery Fork me on GitHub View Demos Download Released under the MIT License. Source on Github (changelog).

How to measure the speed of JavaScript execution If you're curious about the time it takes for your page to load and were wondering if there was something that could tell you what's going on besides human observation, then this excerpt from Even Faster Web Sites will get you pointed in the right direction. The easiest, most straightforward, and probably least precise way to measure latency is via human observation; simply use the application on your target platforms and ensure that performance is adequate. Since ensuring adequate human interface performance is only about pleasing humans, this is actually a fine way to perform such measurements (obviously, few humans will be able to quantify delays reliably in terms of precise whole or fractional second measurements; falling back to coarser categorizations such as “snappy,” “sluggish,” “adequate,” and so on does the job). Manual code instrumentation is really straightforward.

Function.apply and Function.call in JavaScript In order to explain how the createDelegate function works in the last post, we have to understand JavaScript closures and Function.apply(). The apply() method is the easiest subject to tackle, so we'll start there and work up. Every function in JavaScript has a number of attached methods, including toString(), call(), and apply(). If it sounds odd to you that a function might have its own methods - then remember that every function in JavaScript is an object. jCanvas Docs The <canvas> element is a new element apart of HTML5. It allows you to draw shapes, paths, images, and other drawings on a blank element called the canvas. Creating a canvas Before you can draw on the canvas, you need to create one. Of course, the canvas can be any width/height you want.

Documentation moment(String, String); moment(String, String, String); moment(String, String, Boolean); moment(String, String, String, Boolean); If you know the format of an input string, you can use that to parse a moment. moment("12-25-1995", "MM-DD-YYYY"); The parser ignores non-alphanumeric characters, so both of the following will return the same thing.

Related: