Click here to Skip to main content
13,042,421 members (82,994 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Could you please let me know the best way to achieve this thing, for example when a user is seeing a web page (like a e-mail service), if there is some event or update (like a message received from someone), this should be notified to the user right at that time (nearly real time)?

I've thought of using AJAX and a timer-like handler to check for the update periodically but this seems not to be good for the server (there may be a chance when many users will be visiting the page simultaneously and each user has a loop for checking the new contents in the database which is stored on the server-side).

Is there any other technique?

Your help would be highly appreciated!
Posted 26-Nov-12 2:52am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

In Visual Basic we would use WithEvents, but im not sure what the C#/PHP equivalant is, but a quick search turned up this result maybe it can help point you in the right direction.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3


1] Better to Provide Auto Update ON/OFF functionality along with it.
2] Default would be ON but it will GO to DB after some long Time to fetch Data.
3] Provide Refresh functionality to get Data Updated Data Manually.

Those or my suggestion's

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 26 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100