Skip to main content

Posts

Showing posts from July, 2014

Server sent events in PHP

Server sent events are really pretty cool.  They let your application function a little bit more like an application and a little less than a click adventure in the web wonderland.  They are very simple to code and allow your backend code to notify your frontend of progress or other changes. I could get into trouble for this class comment At time of writing they are not supported by Internet Explorer ( see here ) but hopefully Microsoft will either stop making Internet Explorer or bring it up to speed with modern browsers.  Yeah I know that's not going to happen, but we can wish right? You don't need to retain an open connection for every visitor to your site because browsers will reopen a closed connection after a few seconds.  The additional load for implementing SSE seems to be manageable according to people like this guy who have done tests. My first project implementing them was for a database consistency tool that is intended to be run against the database in