You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in localForage/WebSQL driver, the string can be saved BUT it cannot be read out. This is, as the marker makes the WebSQL driver think the content is serialized and tries to pass hello world to the JSON.parse(...) method - which fails.
An easy fix is to prefix all strings stored in the WebSQL driver and not just the ones that serialized:
// Marker used here:// s: ^= String// o: ^= Objectlocalforage.setItem('foo')// -> gets stored as "s:foo" << stringlocalforage.setItem({hello: "world"})// -> gets stored as 'o:{"hello":"world"}'
The text was updated successfully, but these errors were encountered:
Adds support for ArrayBuffer, Blob, and most kinds of TypedArrays
to all drivers. Relies on some hairy code (that could be further refactored)
for localStorage and WebSQL, but the point is everything checks out.
PhantomJS seems to have problems with the Blob test; while I'm hesitant to
skip tests, it DOES work fine in Safari, which is the target there, so I'm
going to look into it but commit this work for now, as it's very useful.
* Fix#28
* Fix#30
* Fix#40
* Fix#63
This partially addresses #69, as it allows for Blob storage, but doesn't
address the issue of extremely large files, which neither localStorage nor
WebSQL will support (their limits are too low).
Adds support for ArrayBuffer, Blob, and most kinds of TypedArrays
to all drivers. Relies on some hairy code (that could be further refactored)
for localStorage and WebSQL, but the point is everything checks out.
PhantomJS seems to have problems with the Blob test; while I'm hesitant to
skip tests, it DOES work fine in Safari, which is the target there, so I'm
going to look into it but commit this work for now, as it's very useful.
* Fix#28
* Fix#30
* Fix#40
* Fix#63
This partially addresses #69, as it allows for Blob storage, but doesn't
address the issue of extremely large files, which neither localStorage nor
WebSQL will support (their limits are too low).
Assuming a developer wants to store the string:
in localForage/WebSQL driver, the string can be saved BUT it cannot be read out. This is, as the marker makes the WebSQL driver think the content is serialized and tries to pass
hello world
to theJSON.parse(...)
method - which fails.An easy fix is to prefix all strings stored in the WebSQL driver and not just the ones that serialized:
The text was updated successfully, but these errors were encountered: