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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:19:03+00:00 2026-06-08T15:19:03+00:00

I am using the Backbone.js Paginator plugin. It does infinite scroll pagination well by

  • 0

I am using the Backbone.js Paginator plugin. It does infinite scroll pagination well by defining its own Collection for the models involved in the pagination. If the user is logged in, the PHP backend will return the Backbone object with an additional attribute is_liked to cause that item to have a different CSS styling.

Problem: When the Paginator plugin (with its own Collection Backbone.Paginator.requestPager) does a GET fetch request on the backend, the backend is not able to determine if the user is logged in! However, when I use the usual Backbone.Collection, the backend is able to determine whether the user is logged in! It works with a $.post() too. This makes me think the problem lies in the plugin’s Backbone.Paginator.requestPager

I am checking the results by using the Network section of Chrome’s developer tools. If the authentication check works, api/test can be seen to return some data about the user. If login status cannot be determined, it returns null

UPDATE: The GET request sent by Backbone.Paginator.requestPager collection does not include the Cookie info in the headers that is found in the GET request sent by Backbone.Collection. Could this be the problem? How can I force Backbone.Paginator.requestPager to not strip out the cookie data from the headers?

What is happening here? And how can I solve this (without rewriting my own pagination code)?

Auth Test using PHP Backend (Laravel Framework)

Route::any('api/test', function() {
    // This will return some data of the user if logged in
    return json_encode(Auth::user());  
});

Typical Backbone Collection [Works]

SimilarUserCollection = Backbone.Collection.extend({
    model: User,
    url: 'api/test'
});

Paginator’s Collection [Doesnt Work]

PhotoCollection = Backbone.Paginator.requestPager.extend({
    model: Photo,

    paginator_core: {
            type: 'GET',
            dataType: 'json',
            url: 'api/test'
        },

    paginator_ui: {
        firstPage: 1,
        currentPage: 1,
        perPage: 7,
        totalPages: 10
    },

    server_api: {

        'page': function() { return this.currentPage; }
    },

    parse: function (response) {

        return response;
    }

});
  • 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-08T15:19:06+00:00Added an answer on June 8, 2026 at 3:19 pm

    This is a crossdomain issue:

    One Request is to this URL:
    http://www.mysite.com/api/test?page=1

    And the other to this:
    http://mysite.com/api/test

    For the browsers http://www.mysite.com is totally different so if the Cookie is generated on http://www.mysite.com requests to mysite.com will not contain it. Be sure that both requests goes to the same domain and you will not have the Cookie issue.

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

Sidebar

Related Questions

I am trying to introduce pagination using the backbone.js paginator plugin 's requestPager .
I'm using backbone with the backbone-rails gem which does its own templating and project
I'm using backbone.js, and I've got a collection with does fetch() sometimes. I don't
I'm using backbone infinite pagination . Take a look at this image. Before I
I am using backbone.js. The elements in my collection are just in the order
We are using Backbone.js to build client-side UI that manipulates models shared by multiple
I'm using backbone boilerplate to render my templates, its fetchTemplate method caches the rendered
Using Backbone I can fetch the Collection like below and render a Backbone View
I'm using backbone.js for my web app and it works semi-well so far. The
Using Backbone.JS, I am able to successfully create new models and save them to

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.