Live data from Hacker News

Store.js - cross browser local storage without using cookies or flash

github.com

41–50 of 63 posts

Re: Store.js - cross browser local storage without using cookies or flash

#41
post #26

It seems as though the author does not believe in semicolon use in Javascript. Looks interesting though.

I use semicolons when they're needed (for loops, multiple statements per line), and don't use them when they're not. The code becomes cleaner to my eyes.

Re: Store.js - cross browser local storage without using cookies or flash

#42

Earlier quoted context omitted.

Yes, that's exactly what I was trying to get at, evidently unsuccessfully. For all of IE's failings, it does seem to have been first to support an awful lot of scripting features. They've always been documented , but hardly anyone seems to know about them until the other browsers popularise them, and even then IE's implementation seems to be forgotten, presumably because APIs are nonstandard and the docs use differen…

XmlHTTPRequest was created by Microsoft for OWA around 2000. I remember using JSRS ( http://www.ashleyit.com/rs/ ) at the time until Mozilla started supporting XHR. Fine times :)

Very cool. From a quick test it looks like JSRS uses a hidden IFrame; in the case of POST it's the target for a scripted hidden form submission. The response is embedded in HTML though (as a textarea no less!), which doesn't make much sense to me.

Re: Store.js - cross browser local storage without using cookies or flash

#43

Anyone know of size limitations on this storage? I am in the middle of writing a jQuery plugin and storing data in cookies which have the 4KB size limitation (which resulted in me having to "chunk" the data across several cookies). This looks like the perfect alternative!

Be careful, there's a limit on how many total cookies you can have per domain too.

Re: Store.js - cross browser local storage without using cookies or flash

#44
post #18

I just tested. Like cookies, it also obeys domain-only visibility. So, all hopes for cross-domain user tracking are still doomed. sigh

Why on earth would you imply that cross-domain user tracking is a good thing ?

because it's a choice

Edit: I misread "is" as "could be". It's a good thing to have because it could be a good thing to use. It may be a bad thing to have enabled by default, but it's a bad thing to omit outright.

Re: Store.js - cross browser local storage without using cookies or flash

#45
post #31
post #22

Earlier quoted context omitted.

I hear you there. I just wish it were easier to have multiple versions of IE laying around without having to boot a VM for each. Heh.

ThinApp [ http://en.wikipedia.org/wiki/VMware_ThinApp ] is pretty useful when needing to do "classic" browser testing.

I don't think many people would be willing to invest $6,000 USD (minimum!) to test old versions of IE.

Re: Store.js - cross browser local storage without using cookies or flash

#46
post #18

Earlier quoted context omitted.

Why on earth would you imply that cross-domain user tracking is a good thing ?

because it's a choice Edit: I misread "is" as "could be". It's a good thing to have because it could be a good thing to use. It may be a bad thing to have enabled by default, but it's a bad thing to omit outright.

The potential for abuse is staggering. Yes, it would be good to have to benign purposes, but unless you trust everyone on the internet to act honorably, it's a terrible idea.

Re: Store.js - cross browser local storage without using cookies or flash

#48
For a different take on local storage, have a look at MilkCrate http://github.com/garrow/milkcratejs

MilkCrate is a wrapper around html localStorage/globalStorage that provides support for saving and querying collections of objects. MilkCrate attempts to implement a similar querying interface to mongoDB.

Re: Store.js - cross browser local storage without using cookies or flash

#49

I just tested. Like cookies, it also obeys domain-only visibility. So, all hopes for cross-domain user tracking are still doomed. sigh

I'm completely unconvinced that cross-domain local storage is even remotely a good idea. I can't think of any data I'd want to store in a clientside database that I would want other sites to be able to see/modify. So, all hopes for cross-domain user tracking are still doomed. sigh Um, this is a good thing. I don't want the sites I visit to be communicating my use patterns to each other.

Actually, it wasn't a sarcasm. I do need cross-domain user tracking for perfectly legitmate reasons. Many of my users do A/B test where control is www.example.com and variation is www.example.org (for example) and the goal page lies on www.shoppingcart.com -- currently there is NO way I can track a user across these three domains (no, third party cookies don't work properly on Safari and Opera).

I am left to experiment with user fingerprinting md5(user-agent, http accept and screen resolution) but that is less than ideal situation.

Re: Store.js - cross browser local storage without using cookies or flash

#50
post #19

Earlier quoted context omitted.

Give IETester a whirl. IE 5.5, 6, 7, 8, and 9 preview render engines in a single executable. http://www.my-debugbar.com/wiki/IETester/HomePage

I'm not convinced that IETester changes the underlying APIs correctly. Because of bad experience with "Multiple IE" simulators in the past I don't test on anything but the real install.

IEs4Linux might work for you then. It can install the original IE6, IE5.5, and IE5 under Wine. IIRC it uses a separate wine tree for each version, so there's no chance of the IE6 js interpreter being run in IE5.
Post reply on HN