I would like to write client-side scripting to enable an offline web page to store data, but I understand there are restrictions on file access for security reasons. Is there any way of creating and managing a client side database using javascript?
Looking in Internet you can find some examples that you can probably use. Try searching something like "local javascript database". If your web page is intended to be always off-line or not the solution can be more o less easy to implement.
with html5, javasvript and sqlite you can capture keystores, events and data while the user use your app, then when there is internet connection you can synchronize the data automatic.
You can use pouchdb to use a database embedded in the user’s browser. It’s capable of synching with a CouchDB instance. It abstracts the differences between Web SQL and IndexedDB and wraps them in a single interface - so you can use it with any browser which supports either one of those. Beware of size limits and browser versions which support it: http://pouchdb.com/faq.html.
Another and option without limits is to use Adobe Air to create native applications. By using it, you can create crossplatform javascript applications (online and/or offline) but with extended features (menus, access to local files within app's directory etc). That's probably the best option. Here is the reference: http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS5b3ccc516d4fbf351e63e3d118666ade46-7d49.html