ajax for send and recv messages

have some *TODO*s in browser-side mesg.js

not handle `err`s in server-side mesg.js (because
I don't know how to handle it)