javascript - Node.js + Express: How to update page when something has been inserted into database? -


i have messaging set up, when sends message, want recipient see message without having refresh page.

it cool when user receives message, there notification/badge appears indicate new message.

i'm newbie delving web development, scenario use ajax? i've been reading it, , seems case. there better way node.js + express?

i need push in right direction. thanks!

having recipient see message without refreshing page can achieved ajax. situation want user receive notification message common one. there several ways of achieving that. can short-polling or long-polling, both of can achieved ajax scaling chat app - short polling vs. long polling (ajax, php). if you're using node, why not websockets. node , sockets literally go hand-in-hand. luck!


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -