On Wednesday, November 2, 2016 at 3:32:54 PM UTC-7, Jaimee S wrote: > > Hello, > > My website allows users to send messages to one another; however, the only > way to see their new messages is to refresh the page. Is there any way to > notify the user via any method? > > Thanks for your time >
There are 2 mechanism in HTML5, I believe, but I'm only going to point you at one for the moment: Web Workers. <URL: http://www.htmlgoodies.com/html5/javascript/working-with-web-workers-in-html5-powered-web-pages.html> <URL:http://www.htmlgoodies.com/HTML5/client/introduction-to-html5-web-workers-the-javascript-multi-threading-approach.html> <URL:http://www.htmlgoodies.com/html5/other/html5-tech-shared-web-workers-help-spread-the-news.html> With this mechanism, you'd spawn a web worker to do jquery/ajax to check when it was time to replace the content. A couple of the examples calculate Pi, and paste the results into the main page. There is also web sockets in HTML5. <URL:http://www.htmlgoodies.com/html5/tutorials/making-html5-websockets-work.html> Gluon/contrib has websocket_messaging.py. I thought I remembered an HTML5 server push mechanisms for notifications, but if it's there I'm not looking in the right place. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.