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 1014337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:14:18+00:00 2026-05-16T10:14:18+00:00

to clarify you know when your on twitter and you get an update telling

  • 0

to clarify you know when your on twitter and you get an update telling you have 2 new tweets, i got the ajax referesh page bit sorted but how do i catch the new update and count them!! if i make sense sorry!!

help will be appreciated

cheers!

kindest regards
Solomon saleh

  • 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-16T10:14:19+00:00Added an answer on May 16, 2026 at 10:14 am

    The way twitter do it is basically:

    • Have a regular AJAX call to a server-side script that returns the number of new tweets
    • When this number is greater than 0, the “N new tweets” bar is shown
    • Clicking this bar loads the new tweets via another ajax call

    One way of catching how many updates there are is to keep track of the last tweet id shown on the user’s page (each tweet has a unique id). So, when the page is loaded, the max(tweet id) is, say, 100. Your ajax call to check for updates will be something like:

    /check_updates.php?last_seen=100
    

    The check_updates.php script then basically checks the DB for latest tweets for the logged in user where id > 100. Similarly, when the user clicks “Show tweets”, the url called will be something along the lines of:

    /show_updates.php?last_seen=100
    

    This will mean that show_updates.php only returns tweets that haven’t been seen before, keeping response times to a minimum.

    The examples above send the id of the last tweet back to the server for comparison, but it could equally be done via the current timestamp. The server-side calculations would essentially be the same (look for tweets since time: X rather than tweet id: y) but it has the benefit of the client side not having to keep track of the last tweet id loaded.

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

Sidebar

Related Questions

UPDATE: To clarify a generic error catcher that catches 404's doesn't have enough granularity
I am writing to clarify some comments on this website. 1) I know that
To clarify, I currently have a live app that does not implement in app
I don't know if this is the correct website, but you guys have been
folks. I would really appreciate to have your help on the following question: In
I know that in Java, it is common practice to use get as a
I have a general understanding of restrict but I'm hoping to clarify some fine
There are often times when you know for a fact that your loop will
I'm new to mysql and have a choice regarding mysql database structure for my
Ok, I know I must be missing something simple. Thank-you for your help! [EDITED

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.