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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:56:11+00:00 2026-05-28T05:56:11+00:00

this is the first question I post in this site, so you have to

  • 0

this is the first question I post in this site, so you have to excuse me if the title is not clear.

I have this situation: a php page that needs to process data taken from different api calls (facebook, youtube, lastfm). As expected, the page will take years to load and that’s fine.
So the question is.

Is possible to create a page that just takes the two basic data that I need to start the process – the facebook id and the token – then tell the user to wait, and server-side initiate the process, without leaving this annoying “loading page” open? I really have no idea how to trigger such a thing.

Thank you in advance.

Ps. I’ve already managed to optimize with fql multiple query for the facebook api and other tricks like that, but since the result of the call from one api leads to a specific call to another, it doesn’t seem possible to me to get it fastwe.
And, clearly, I’ve already been throught the facebook auth process for the user landing in this slow loading page.

  • 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-28T05:56:12+00:00Added an answer on May 28, 2026 at 5:56 am

    You will want to use this type of paradigm for getting the best user experience.

    AJAX is your friend

    Only send down the minimal information you need to get the outline of the page displayed to the user.

    <html>
    <head>
    ...scripts, meta, css etc...
    </head>
    <body>
    <h1>Facebook Info</h1>
    <div id=facebook-info>
    <p>loading...</p>
    </div>
    
    <h1>Twitter Info</h1>
    <div id=twitter-info>
    <p>loading...</p>
    </div>
    
    </body>
    </html>
    

    Then in each of the content sections (that you have yet to load) have a spinner.

    In the loading of your javascript (I’m abbreviating for sake of clarity…see http://jQuery.com/ for more info on their ajax calls), you can make calls to specific php pages that spit out some JSON. This is where the real work happens and takes the time.

    <script>
    $(document).ready(function(){
       $.ajax('/content/getFacebookInfo.php',displayFacebookContent);
       $.ajax('/content/getTwitterInfo.php',displayTwitterContent);
    });
    </script>
    

    Then in the displayFacebookContent and displayTwitterContent callback functions, this is where you build the content for the DOM dynamically.

    <script>
    var displayTwitterContent = function(response) {
      var html = "<ul>";
      foreach(var i in response.posts) {
         html += "<li>" + response.posts[i].message + "</li>";
      }
    
      html += "</ul>";
      $('#titter-info).append(html);
    };
    </script>
    

    Again, this is abbreviated to show the concept, you will have to flesh out the scripting and also build the php handlers that respond with JSON objects.

    By offloading the hard work to the AJAX handlers the main HTML is served down quickly and the user is happy. By the time his eyes move around the page, some of the AJAX calls will have completed and you’ll have dynamically inserted useable data into the DOM and they’ll see it.

    It’s kinda like google’s search as you type, it’s making an AJAX call back to the server and grabbing content for you to display in real time before you even click submit.

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

Sidebar

Related Questions

this is my first question.. so, here we go. i have a site, 100%
this is my first question here :) I know that I should not check
This question has two parts: #1 I have a functions.php that is filled with
This is my first time here so I hope I post this question at
This is my first question :). Im writing a little twitter app in PHP
This is my first question. Thanks to everyone who contributes to this site, it's
My first post on this site with huge hope:: I am trying to understand
This is my first post, but I've loved using this site as resource for
this is my first question, but i use this site a lot this last
This is my first post, but I've been using the site for years. However,

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.