From 29a4b0151f66e018809cd56e7f0a7382d3006eb5 Mon Sep 17 00:00:00 2001 From: Louis Chatriot Date: Mon, 9 Nov 2015 14:22:08 +0100 Subject: [PATCH] Update README.md --- README.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f9a9c3b..dcf06f4 100644 --- a/README.md +++ b/README.md @@ -576,29 +576,26 @@ db.removeIndex('somefield', function (err) { ## Browser version -As of v0.8.0, you can use NeDB in the browser! You can find it and its minified version in the repository, in the `browser-version/out` directory. You only need to require `nedb.js` or `nedb.min.js` in your HTML file and the global object `Nedb` can be used right away, with the same API as the server version: +The browser version and its minified counterpart are in the `browser-version/out` directory. You only need to require `nedb.js` or `nedb.min.js` in your HTML file and the global object `Nedb` can be used right away, with the same API as the server version: ``` ``` -It has been tested and is compatible with Chrome, Safari, Firefox, IE 10, IE 9. Please open an issue if you need compatibility with IE 8/IE 7, I think it will need some work and am not sure it is needed, since most complex webapplications - the ones that would need NeDB - only work on modern browsers anyway. To launch the tests, simply open the file `browser-version/test/index.html` in a browser and you'll see the results of the tests for this browser. - -If you fork and modify nedb, you can build the browser version from the sources, the build script is `browser-version/build.js`. +If you specify a `filename`, the database will be persistent, and automatically select the best storage media available (IndexedDB, WebSQL or localStorage) depending on the browser. -As of v0.11, NeDB is also persistent on the browser. To use this, simply create the collection with the `filename` option which will be the name of the `localStorage` variable storing data. Persistence should work on all browsers where NeDB works. Also, keep in mind that `localStorage` has size constraints, so it's probably a good idea to set recurring compaction every 2-5 minutes to save on space if your client app needs a lot of updates and deletes. See database compaction for more details on the append-only format used by NeDB. +NeDB is compatible with all major browsers: Chrome, Safari, Firefox, IE9+. Tests are in the `browser-version/test` directory (files `index.html` and `testPersistence.html`). -**Browser persistence is still young! It has been tested on most major browsers but please report any bugs you find** +If you fork and modify nedb, you can build the browser version from the sources, the build script is `browser-version/build.js`. ## Performance