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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:44:30+00:00 2026-06-10T00:44:30+00:00

Background: Building a small app where the intention is that full page loads do

  • 0

Background: Building a small app where the intention is that full page loads do not happen after initially arriving to the app. Implemented pjax_rails plugin. However create, update, and destroy actions (and anything that executes a redirect_to) cause a full page load.

Question: How can I get around this while still using pjax (and preferably still using the pjax_rails gem)? I know how the problem could be solved with ajax, but it would be much better if the whole thing could be taken care of with this pjax implementation; history, degradability, etc.

To save clarification time, these things have been done:

Gemfile

gem 'pjax_rails'

application.js (including other requires in case there’s some conflict I don’t know about)

//= require jquery
//= require jquery_ujs
//= require jquery.pjax
//= require twitter/bootstrap
//= require_tree .

// Explicitly specify which links have PJAX enabled.
$(function() {
  $('a:not([data-remote]):not([data-behavior]):not([data-skip-pjax])').pjax('[data-pjax-container]');
});

Also tried the following in application.js in case there’s something I’m overlooking

$('a').pjax('[data-pjax-container]');

And tried

$('a').pjax('[data-pjax-container]', { timeout: 200000 });

application.html.erb

<div data-pjax-container>
  <%= yield %>
</div>
  • 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-10T00:44:32+00:00Added an answer on June 10, 2026 at 12:44 am

    While this is not a direct answer to my question, it’s the solution I’ve taken with my app.

    For any single-page app (SPA), or even an app with a decent amount of asynchronous updates, using a JavaScript framework seems to really be the way to go. For me, I went with Backbone.js; although there are a lot of other options – Knockout, Angular, Cappuccino, SproutCore, Ember, Spine.

    See Why use Backbone.js?

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

Sidebar

Related Questions

Background: I'm building a small application that will be run daily, pulling data from
I am building a small app that I can use to do Interval Training,
Background: We're building an application that allows our customers to supply data in a
Some background I'm currently building a predominantly classic web app (rather than a single
Background: I am building a webapp that makes use of JQuery and the Facebook
I'm building a small site, that needs to support 2 languages for the same
I'm building a background job that's updating users' statistics for a web application. The
Background: I'm building a view-based NSTableView-esque control in Cocoa/Objective-C that offers the ease of
I'm thinking of building a small web app using the MVC framework as a
We're building a web app that customers can pay a monthly rate for. Here

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.