AJAX - The Complete Reference

(avery) #1

534 Part III: Advanced Topics


Approach Description Comments
Cookies Stores data in persistent
cookies (disk cookies), splitting
larger items across a number
of cookies to be concatenated
together upon retrieval.

Possible in any browser.

Subject to cookie cleansing
from privacy concerned users.

Size and browser limitations.

Network impact as the cookie storage
would be transmitted with every request.

Security impact as storage is sent in
requests.
Internet Explorer
Behaviors

Stores data relative using a
DHTML behavior bound to a page
element such as a <div> tag.

Internet Explorer–specific system.

A single page is limited to 64K of
persisted data with a whole domain limited
to 640K.

Without a special cleaning program it
may be difficult for users to dump this
information.
Flash storage Uses Flash shared object to
store data in browsers that
support Flash.

Most bridge between SWF file embedded
in page and JavaScript.

Shareable between browsers, unlike any
other mechanism.

By default you should be able to store
100KB of data in this system. It is
adjustable with user prompts.

Users unlikely to dump persisted data
as they are unaware of the storage
mechanism.
Native Browser
Storage (DOM
Storage)WhatWG

A globalStorage system is
natively available from supporting
browsers in JavaScript.

Can be shared across a range of domains
and sites. Could be open for abuse.

Only implemented in Firefox browsers at
this point in time.

According to the current spec, a 5MB
limit is currently defined, though this may
change, particularly if abused.

TABLE 10-3 Summary of Push-style Communications Approaches
Free download pdf