Tagged Under: JavaScript


Offline Storage, IndexedDB and the onbeforeunload/unload Problem

October 16th, 2014

Offline storage is one of the best parts about HTML5. No longer do you have to always send client data back to a server where we have to communicate back and forth if we don’t need to. Say we are saving some user preferences for an app, or saving some game data on close/exit. Say you are working on a document and accidentally close or refresh the tab.

Read the Rest... This post currently has 3 responses.


State of Nearest-neighbor Interpolation in Canvas

November 8th, 2013

Nearest-neighbor interpolation is the bread and butter of pixel art and a staple for many indie games. It’s what allows us to create crisp and sharp pixelated graphics, responsively without exporting all our graphics upscaled via image editing software.

Read the Rest... This post currently has 7 responses.

The Real Scoop on jQuery .find() Performance

January 8th, 2013

.find() seems to get a bad rap. Some people state that selectors are WAY better for performance, some people say that .find() is. Well, actually both can be true. Not only depending on what amount of elements you are searching, but HOW you are selecting or finding them as well.

Read the Rest... This post currently has 3 responses.

Saving and Loading Objects (or Arrays) in localStorage

November 22nd, 2012

Although localStorage is not very popular (due to size browser sizing constraints and lack of consistency), it can still be a great (and fairly cross-browser) way for storing lots of data. About 2.49-4.98MB worth depending on the browser.

Read the Rest... This post currently has 41 responses.

Fading A Background Image In

September 14th, 2012

Fading in a website background image is not generally an easy task. This is because there’s no opacity state for background images in specific. Fading a solid background is pretty easy using RGBa – not so easy for images. There’s also the issue of when you change the opacity of body (or wrapper) element, everything inside (or the children) are effected as well. In this example, I will be using jQuery to animate the effect.

Read the Rest... This post currently has 5 responses.