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

The Archive Base Latest Questions

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

How is the right way to get page content each second? I have one

  • 0

How is the right way to get page content each second?
I have one page which got a music player (using flash player) and other that generates the name of the song(php file). I have set the php file to ECHO only the name, so the only thing is to get that echo and put it at main page where is the player. But it must refresh each second(or 2-3max) because the songs are changing and so are the names.
I hope you can understand my need , ask me for other details if you need.

  • 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:57:54+00:00Added an answer on May 24, 2026 at 7:57 pm

    I wouldnt advise using setInterval with an AJAX request, as if an ajax request is taking a long time to respond, then it will still keep sending subsequent requests. Instead I would have a complete callback which triggered the next setTimeout, e.g:

    function setRefreshTimeout() {
        setTimeout(loadSongs, 1000);
    }
    
    function loadSongs() {
        $('#title').load('/songtitle.php', function() {
            setRefreshTimeout();
        });
    }
    
    setRefreshTimeout();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to find the right way to get the data from a
What is the right (portable, stable) way to get the ToS byte of a
What is the right way to populate the model for the index page in
I have an ASP.NET MVC site (Master Page + Content pages). On the master
Below is one item in my page, which consists of the div containing two
I have two divs, one on the left, and one on the right side
I am using jQuery .load function to get 3 list items from other page.
I have 6 divs on a page which are dynamically placed into 2 columns
Using the code below I can't get the image in the web page. I'm
What is the right way to perform some static finallization? There is no static

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.