Yes - provided that they open your page again with an internet connection at a later date.
The steps are:-
- Try and send message (AJAX etc.)
- If it fails due to no connection - store to localstorage.
- Have a loop that checks for messages in local storage.
- If message found try to re-send.
- Once message is sent remove it from local storage. (AJAX
success
)