Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6337975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:21:14+00:00 2026-05-24T19:21:14+00:00

Is there a way in HTML5 (websocket perhaps?) to set up some kind of

  • 0

Is there a way in HTML5 (websocket perhaps?) to set up some kind of push mechanism for ajax requests? For instance, I would like my logged in user to be notified he has a new message without sending a periodic ajax request to the server checking if there actually is a new message.

Right now, I do a check every couple seconds and change the UI accordingly if I get a number back, but for 10000 users this tends to get quite demanding on the server with frequent updates.

If HTML5 does not have a native ability to handle this, is Comet (http://www.zeitoun.net/articles/comet_and_php/start) a better approach than periodic ajax calls?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T19:21:16+00:00Added an answer on May 24, 2026 at 7:21 pm

    Comet is made for that exact purpose, but Websockets in HTML5 will offer much better performance. See https://stackoverflow.com/questions/4262543/what-are-good-resources-for-learning-html-5-websockets

    However, Websockets aren’t supported in most browsers yet, so you’ll need a library to serve as a layer of abstraction between your application and the specific implementation supported by the current browser (using WebSockets if they are available, but falling back to long-polling, Flash sockets, etc. as necessary). Fortunately there are plenty of libraries like that.

    To find an appropriate implementation for your app, you should take a look at CometDaily’s Comet Maturity Guide. Not mentioned there, however, is the APE project (Ajax Push Engine), which is gaining a lot of traction with web application developers right now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

please is there a way how to apply styles to html5 elements like header,
Is there a way to emulate video transition effects in HTML5 like this: http://www.flash-filter.net/mask-transition-effect.phtml
Is there a way to make HTML5's Geolocation only work, if it is using
Is there a way to style HTML5's range control? Is it possible to change
Is there a way to use two HTML5 video tags on a page and
Is there a way to convert SVG files to HTML5's canvas compatible commands?
Is there a way to use the HTML5 Canvas API on a memory-saving 1bit
Is there a way to call C#/.NET/win32 from HTML5?
Is there any way to check a browser whether it supports 'HTML5 History API'
Is there a way to play a video fullscreen using the HTML5 <video> tag?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.