• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

client side storage for firefox, chrome & IE

 
albert kao
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to store some strings at the client side for firefox, chrome & IE?
This code works on firefox & chrome but does not work on IE - no alert window appears.


This code does not work on firefox, chrome nor IE - no alert window appears.

I use the Prototype JavaScript Framework on Windows Vista Home.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using IE8?

Eric
 
albert kao
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric Pascarello wrote:Are you using IE8?

Eric


Yes.
I plan to support IE7 too.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
albert kao wrote:I plan to support IE7 too.


Not if you want local storage capabilities.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gregg Bolinger wrote:
albert kao wrote:I plan to support IE7 too.


Not if you want local storage capabilities.


AKA, IE7 does not support it. You would have to have the user install a 3rd party plug-in to do it.

Eric
 
albert kao
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric Pascarello wrote:
Gregg Bolinger wrote:
albert kao wrote:I plan to support IE7 too.


Not if you want local storage capabilities.


AKA, IE7 does not support it. You would have to have the user install a 3rd party plug-in to do it.

Eric


Which 3rd party plug-in should I use?
Does the Prototype JavaScript Framework support local storage capabilities?
Does IE8 support local storage capabilities?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
albert kao wrote:
Which 3rd party plug-in should I use?

http://gears.google.com/ is an option, but it is not being updated anymore

albert kao wrote:
Does the Prototype JavaScript Framework support local storage capabilities?

http://www.domcached.com/ is one option, I am sure you can find others if you searched. EW to prototype.js

albert kao wrote:
Does IE8 support local storage capabilities?

http://lmgtfy.com/?q=localStorage+IE&l=1

Eric
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just as a tip, you're relying on some cutting edge, technically not official features of an unfinished HTML specification (HTML 5). If you have that luxury then good on ya, but I foresee much pain in your future.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you really think that your users will appreciate having to install a plugin to use your site?
 
albert kao
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gregg Bolinger wrote:Just as a tip, you're relying on some cutting edge, technically not official features of an unfinished HTML specification (HTML 5). If you have that luxury then good on ya, but I foresee much pain in your future.


In that case, what are my options to store some user preferences?
Is cookie a good idea?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reason you do not store user preferences on the server?

Cookies may not be enabled, they can only hold so much information, they get sent to the server with every request.

Eric
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The purpose in HTML5's local storage feature is to allow your users to use the application offline. Google created gears because they wanted people to still be able to access their email, documents, calendars, etc even if they didn't have a connection to the internet. It was not meant to store user preferences (unless you need them for offline viewing).

As Eric said, store it on the server. In fact, no matter what you do with local storage, everything should still be on the server. That's the point. Use local storage when you need it, but always have it on the server.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I foresee this as the next shiny new toy that will be used badly and needlessly just because it's "cool".
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:I foresee this as the next shiny new toy that will be used badly and needlessly just because it's "cool".


My problem with local storage (not specifically HTML5) is that any Tom, Dick, and Harry can write a web application that stores who the hell knows what on my local computer. Cookies are one thing, controlled. But who's stopping Dick (pun intended) from loading his data warehouse on my local machine? You know, just because he can.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic