Msg#: 4389793 posted 12:03 pm on Nov 22, 2011 (gmt 0)
I'm developing an HTML-based system that enables employees to access information in a database and then update the info periodically. It's fairly critical that the information entered into the 'terminal' (i.e. the web browser) is sent to the server so that all terminals can be synchronised.
In a perfect world, the web browser would always have a flawless connection to the internet, but as we know, that's not the case!
My question is, what would be the best way of overcoming this? I'm able to specify that users use a certain browser, so could specify that they have to use an HTML5 compatible browser (with local storage).
My current thinking is that I'll have an indicator in the application that shows users if their connection is offline. If it is, they will still be allowed to enter data but it will all get stored in local storage, ready to be synced as soon as the browser is online again.
One potential issue is what happens if the browser is closed before it syncs.
Msg#: 4389793 posted 9:21 am on Nov 23, 2011 (gmt 0)
The app enables employees at various locations to stay up to date with the same information... kind of like a CRM accessed from multiple locations. The difference is that they still need to be able to enter information if they have a connectivity lapse, whereas office based workers would just have a tea break until the connection was restored.
Due to the conditions the app is going to be running in, I'm able to specify a minimum browser requirement, so am happy to rely on an HTML5 feature such as local storage. But you're quite right, there does need to be a way to sync it all together once the browser is back online and is able to send its locally stored data. That can be dealt with server-side in PHP.
I've done a little more research on local storage and have found that it's persistent between browser sessions. This would make it perfect for my needs, so the main headache is now the server-side problem of ensuring it's all in sync.
I'm loving HTML5 already (assuming this all works!).