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

  • Home
  • SEARCH
  • 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 7740521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:48:01+00:00 2026-06-01T08:48:01+00:00

Please see following examples first, and which one is better? Could you compare some

  • 0

Please see following examples first, and which one is better?

Could you compare some aspect such as performance, programming, design, load, user experience, maintenance, security or any other aspect which I have not expected.

Can these aspect help me to decide which one is better?

<script>
$(document).ready
(
    function()
    {
        var message={..something..};
        $.ajax
        (
            {
                url:'get_content.php',
                data:message,
                type:'post',
                cache:false,
                success:function(data)
                        {
                            foreach(data.array)
                            {
                                $('#content').append($('<tr><td>'+data.array[key]+'</td></tr>'));
                            }
                        },
                error:function(){alert('error');}
            }
        );
    }
);
</script>
<table id="content">
</table>

<table id="content">
<?php
query sql;
while(row=fetch result)
{
    echo '<tr><td>'+row[field]+'</td></tr>';
}
?>
</table>
  • 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-06-01T08:48:03+00:00Added an answer on June 1, 2026 at 8:48 am

    You’re comparing apples to oranges.

    • PHP — Server-Side Language
    • AJAX — Client-Side Language (JavaScript)

    AJAX is about your only (reasonable) means to grab data from the server on behalf of the client without a full page refresh. However, you can use an assortment of different languages server-side to render the data necessary for AJAX to proceed. (ASP, PHP, …).

    It’s up to you and what the rest of your site is developed in really. If you want an absolute (no failure) method of producing content, a PHP dump is about the best way. It’s guaranteed to be visible and won’t break depending on client support (maybe they have NoScript plugin?).

    However, if there is a lot of data, it’s sometimes better to spread the load over multiple calls so that the client has at least a semi-complete portion of the page visible, and the data comes later. (This is generally how Facebook proceeds–they give you the general layout in the first fraction of a second, then the rest of the content comes once the framing is complete).

    One thing to note though is that it’s not an either/or kind of decision. You can use AJAX with a PHP fall-back, you just have to have code in place to test the client and relay that information back to the server for an informed decision.

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

Sidebar

Related Questions

Please see the following example which is a very simplified version of my code:
Please see following methods. public static ProductsCollection GetDummyData(int? customerId, int? supplierId) { try {
Please see the following code: List list = Collections.synchronizedList(new ArrayList()); // ... synchronized (list)
How do we update a textbox on ticking checkboxes? Please see the following code,
Please see this fiddle I want the scrolling div stop following when left div
Can someone please help me figure out a way to achieve the following (see
Please bear with me on this one. I am first going to describe an
Please see the following example table. I would like to count the 1's in
(Problem solved, please see the updates) I have some files that have incorrect filenames
Please see here for a related question . However, char goes to 0xffff (or

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.