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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:04:49+00:00 2026-06-11T06:04:49+00:00

I have page Users where profiles are displayed with some basic data: profile photo,

  • 0

I have page Users where profiles are displayed with some basic data: profile photo, nickname, age, location etc. When you click on profile, it loads data with ajax and shows user profile in pop up. So you stay on the same page.

But every ajax call needs some time to call serverside code and get data. It is not slow, but I want to make user profile display ultra fast. I was thinking that it would be much faster if I pull all profile data at the first place when I get profiles list. Instead of getting just some data on the Users page, I can pull all profile data. Then I can save the data in javascript as array. When user will click on profile, it won’t make ajax call but it will pull data from javascript array. In this way, I think pop up will be shown rapidly.

So far this is just idea. Is it ok to store data I received in javascript array or is any better method?

  • 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-11T06:04:50+00:00Added an answer on June 11, 2026 at 6:04 am

    use javascript object

    get the user info in php and pass them to a function in js in the html

    <script>buildUserInfo(array('user_id,yaz,20,male,837367.jpg',....));</script>
    

    then create a js object and but these value in

    var userObject = new Object();
    function buildUserInfo(data){
      for(var i=0;i<data.length();i++){
        var dataIn = data[i].split(',');
        userObject[user_id].name = dataIn[0]; 
        userObject[user_id].age = dataIn[1]; 
        userObject[user_id].gender = dataIn[2]; 
        userObject[user_id].photo = dataIn[3]; 
    }}
    

    and then you can access them by simply call the object
    if you whant the name just call userObject[user_id].name

    update:
    for multiple users by creating an object array i edit the code above

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

Sidebar

Related Questions

Users on my site have their profile page. There, users can setup their data.
I have a web page where users can see data from MongoDB on a
In my application I have some basic user information that needs to be displayed
Dear all, I have a question about Facebook Page: ( NOT user profile page,
I have a user profile page on my web app which has contact information.
I have the following models: User: hasOne Profile, Page hasMany Comment Comment: belongsTo User,
I have a page where users can select different documents files in a datalist
There is a need to have a takeover page when users visits the website
I'm new to using SugarCRM. I want to have a users page that does
I have a html page that allows users to submit a file. Below is

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.