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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T23:54:51+00:00 2026-05-19T23:54:51+00:00

Let say I have a page with 100 objects and each page is around

  • 0

Let say I have a page with 100 objects and each page is around 700 bytes when converted to json.

In order to save the objects to the php based controller I have the following options.

Option 1

For each objects (100 objects) do the following

  1. Take object definition
    2 .convert to json
  2. Do http post to the php controller
  3. the php controller saves it to a file or database.

Option 2

Variable bigJsonString;

For each objects (100 objects) do the following

  1. Take object definition
    2 .convert to json
  2. append the json to a string variable “bigJsonString” with a delimitter to indicate end of object.

After the big fat bigJsonString is constructed

  1. Do http post to the php controller by sending “bigJsonString”
  2. the php controller saves it to a file or database.

In option 1, I am doing 100 http posts one after another. Does this raise any alarms?
Is this normal for web applications doing ajax post?

The second option seems safe but then the only concern is when the 100 objects become say 500 objects or to a point where the “bigJsonString” goes several Megabytes long.

The third option we can introduce is a hybrid of option 1 and 2 where we start by constructing the “bigJsonString” and if the length goes to a certain limit then do a ajax post. Flush the string and build the string again for remaining objects.

What are the pitfalls and what is the normal or standard practice. if someone can point to resources where this is already analysed, that would be great.

Thanks very much.

  • 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-19T23:54:52+00:00Added an answer on May 19, 2026 at 11:54 pm

    Browsers generally limit the number of connections to a single domain to a low number (under 20 by default for most browsers). In the meantime, many of your requests will block.

    On the other hand, larger requests will take longer to fully process because there are less opportunities for parallelization.

    Ideally, you would try both methods and see which one works most effectively.

    A note: for the second method, you could create an array of the objects then serialize the array as JSON, instead of manually dealing with the JSON string. (JSON supports arrays, not just objects!)

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

Sidebar

Related Questions

No related questions found

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.