views:

43

answers:

2

Just wondering what are the actual benefits of using HTML5's sessionStorage when storing HTML content to be used in a Javascript carousel?

Is it performance related? Load Times? Bandwidth?

A: 

Theoretically (and probably actually in most cases), faster load time, as it is almost like the images are already cached (loading from the user rather than the server). I don't know much about it, but had looked into whether it would help as a storage for images on https connections. It did not help there (and in fact, may have made it worse).

Scott
+1  A: 

Yes. sessionStorage stores much more information than cookies can, and it is easier to access as well.

By storing data you need to access again locally, you avoid (or minimize) ajax calls, and in turn server and database loads.

This will result in faster page loads (as you will not need to wait for the server to provide the data), and bandwidth (as you have minimized communication with the server).

kingjeffrey