1

Can someone give me direction as to where to go with this?

I have a online app (mostly javascript, mvc Django), a questionnaire. This app will also be offline, as allot of the areas where these questionnaires will be done do not have internet (this is Africa...).

So the way I see it is this: Save all answers offline, with lets say localstorage. Detect when users goes online Have a "report sync" page, with all the offline data in a list Let the user press a sync button then send the data to the Django models to save it.

I don't really know how to get where I want to go, but that's my plan. Any other suggestion?

Also please note that the people conducting the questionnaire will have their own computers, so I will have to give them a html web page that they can open offline.

I just need direction, I will figure it out somehow! :-)

EDIT: What about putting the "html" page into a executable file, so I know they cant delete files etc by ascendent? Maybe to complicated for this?

EDIT:

I now know that you cant use html5 localStorage on local files. Because the files will be stored locally on the persons computer, I dont think I can use localStorage. Any suggestions? I am thinking that I must have a very simple desktop app that starts a simple html web server so the localStorage can be used etc. Also that it is executable and safer that just an html file with all the source. Any ideas how?

1 Answer 1

1

As you outlined is the way to go. Consider PersistJS to abstract away pre HTML5 browsers.

Also consider local data protection, depending on the nature of the questionnaire. There is always the possibility that the device is lost or that the browser is shared between users.

And being offline, you also have to handle HTML5 application caching.

Sign up to request clarification or add additional context in comments.

2 Comments

I just read that "loading the file locally means that it doesn't have an origin. Since localStorage is uses the same-origin policy to determine access to stored data, it is undefined what happens when you use it with local files, and likely that it won't be persisted." So now I have a problem, since the html file is saved locally. mmm
That is whare HTML5 application caching comes in. Have you tried that?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.