java - auto reload content of a postgreSQL table -
i using code:
to output table. question how possible updating in page without reloading?
thank you
either use ajax requests or if feel good, try html5 websockets : add trigger
table update / insert / delete
, , keep clients up-to-date.
ajax means you'll doing request client server every few seconds, check if have changed , if so, you'll download new data (usually devs use json), , update table using javascript data.
with websockets, event starts server side : whenever db table updated, send request server clients tell them update table new data.
you'll find plenty of examples on web, searching either ajax or websockets.
if don't know are, i'd recommend go ajax, setting-up websockets server php might tricky.
Comments
Post a Comment