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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:11:45+00:00 2026-05-25T03:11:45+00:00

This seems like an obvious one, but I’m somehow missing it… How do you

  • 0

This seems like an obvious one, but I’m somehow missing it…

How do you send options along with a backbone.js collection fetch()?

Or, from a broader point of view: I have a large dataset on the server, messages in this case, that I want to make accessible through a collection. Seeing as there could be thousands of messages I don’t want to simply fetch and store all of them at once, so my collection would have to at least understand limits and offsets. Not to mention querying filtered or sorted lists.

Is a backbone collection even the way to handle this?

Cheers

  • 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-25T03:11:46+00:00Added an answer on May 25, 2026 at 3:11 am

    I’ve been messing with Backbone for a couple days now and I had to deal with this problem almost immediately and I looked at this solution, but I found it clunky. After reading some more backbone documentation I discovered you can actually override any of the jQuery.ajax options within the fetch() method. So for example

    Posts = Backbone.Collections.extend({
      model: Post,
      url: '/posts'
    });
    

    Now when you want to call fetch just send it whatever parameters you wish. e.g.

    var posts = new Posts();
    posts.fetch({ data: { page: 3, pagesize: 10, sort: 'asc' } });
    

    This will produce the following request:

    http://yourdomain/posts?page=3&pagesize=10&sort=asc
    

    Anyway, I know you’ve already accepted an answer, but hopefully this will help someone.

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

Sidebar

Related Questions

Seems like this should be obvious, but how do I send arrow key presses
This seems like it should be obvious but I can't figure it out. Suppose
This seems like an obvious question but there does not appear to be an
this seems like an obvious question to me, but I couldn't find it anywhere
Ok this might seems a bad idea or an obvious one. But let's imagine
This seems like a pretty softball question, but I always have a hard time
This seems like a simple question, but I can't find it with the Stack
This seems like a silly question but I would really like your comments and
This seems like such a trivial problem, but I can't seem to pin how
This seems like perhaps a naive question, but I got into a discussion with

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.