Is it possible to receive notification on mobile devices whenever it's generated from the web Server.
This thing can be achieved by native apps for iPhone and Android. But my requirement is to achieve the same via a mobile website. Also is it possible to receive notification even if the user has closed the web browser.
It is possible to acheive, and you have 2 main ways to achieve this:
Both methods require some trick server software, a good example is Socket.IO running on Node.JS platform.
Websockets require an HTML 5 browser (eg, Chrome) so might not work for your requirements.
HTTP long polling is the act of accepting an inbound HTTP connection on the server, and then sleeping until you wish to push the data to the client. Node.JS can be set to do this quite easily, or you could use Socket.IO (a library on Node.JS) which provides extra functionality. Socket.IO also works with Websockets where possible - and falls back to long polling if it has to.
In short, you will need a server platform to do this - I suggest you look at Socket.IO to start with. You can always roll your own once you have the main concept nailed. I wrote one in ASP.net which worked quite well, for example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With