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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:39:42+00:00 2026-06-01T22:39:42+00:00

Currently I have an each loop in the template for where the comments are

  • 0

Currently I have an each loop in the template for where the comments are display. Say a user has 50 comments to a micropost they have posted. A long list showing 50 comments will be displayed.

To save space on the page I’ve decided I’d like to limit comments shown to 2-3 per micropost. If a user wishes to view more they can click “view more” or “view all”. I’m wondering how a server would cope if there were like 10,000 comments and a user clicked “view all” which is why I may choose to implement “view more” then have like 50 more comments shown”

Anyway I’d like to know a good way to limit the amount of comments shown to a user until they choose to view all?

If I go the jquery/js route and make it so only the 2-3 most recent messages are shown the others would have still been loaded back end wouldn’t they so wouldn’t a better option be to control this in ruby on rails some how?

I’d really like some nice solutions/info on the best way to do this.

Any further info you need I’d be happy to provide.

Thanks
Kind regards

  • 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-01T22:39:43+00:00Added an answer on June 1, 2026 at 10:39 pm

    You can do like Facebook:

    • Show only 2/3 comments. Load only 2/3 comments from the backend.
    • When the users clicks “Show more”, it shows 50 more. It loads them through AJAX. So on the backend you only get a request like “GET 50 comments EXCEPT the three firsts”.
    • Another “Show more” link is shown. It will load 50 other comments except the 53 firsts.

    On Facebook, you can’t load more than 50 comments at once. I think you should do the same.

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

Sidebar

Related Questions

I have a list of communities. Each community has a list of members. Currently
I have a table users with primary index userId . Currently, each user has
Currently I have Long Pres Gesture Recognizers on four different TableViews (two in each
So I have this need to import (currently) about 15k products. Each product has
I currently have a data model set up where each School object has a
I am using C#. I have a list of items. I loop through each
Currently I have a loop that updates the DOM in each iteration; I have
I currently have a json object, that I loop through and output a list
I have a list of users on my php application (using codeigniter). Each user
I currently have 4 Divs, each of which contains a hyperlink. Each hyperlink 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.