My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Wiki pages
Links

Описание

iLocalStorage — библиотека, позволяющая сохранять данные на стороне клиента.

Используемые хранилища: DOM Storage, Web Database, Internet Explorer userData behavior, Flash Local Storage, HTTP cookies (document.cookie).

Пример использования:

iLocalStorage.setup({
	'engines': [iLocalStorage.ENGINE_COOKIE, iLocalStorage.ENGINE_FLASH],
	'defaultEngine': iLocalStorage.ENGINE_FLASH,
	'swfUrl': '/release/ilocalstorage.swf'
});

iLocalStorage.ready(function()
{
	this.use(iLocalStorage.ENGINE_COOKIE);

	this.setup({
		'cookieDomain': '.' + location.hostname,
		'cookiePath': '/'
	});

	this.set('testText', 'text');

	var ns = 'namespace';
	this.set('testNamespace', true, ns);

	this.set('testBoolean', true);
	this.set('testNumber', 1234567890);
	this.set('testObject', {'propertyOne': 1, 'propertyTwo': 2});

	this.set('testRemove', true);
	this.remove('testRemove');

	if (!this.hasKey('isSetTestExpires'))
	{
		this.set('isSetTestExpires', true);
		var expires = +new Date + 10 * 1000; // 10 секунд
		this.set('testExpires', 1234567890, null, expires);
	}

	var value = this.get('testExpires');
	alert('value: ' + value + '\ntypeof: ' + typeof value);
});

Подробнее читайте в документации.

Скачать актуальную версию

ilocalstorage.zip — Код для использования на сайтах.

ilocalstorage-src.zip — Исходные коды.

Powered by Google Project Hosting