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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:05:54+00:00 2026-06-05T18:05:54+00:00

I am trying to use the backbone architecture in my MVC application. I created

  • 0

I am trying to use the backbone architecture in my MVC application. I created the templates using HandleBars/Mustache and my model contains information that I display in a table on the UI (within a div).

I would like to reload the page after every 5 mins to refresh the data in the table.
I can use
<meta http-equiv="refresh" content="some value" />,

but it won’t hold the view data in the table. How can I refresh the page in this scenario?

EDIT:
Basically, on the page I have a search box and the search items are loaded on a table. If I refresh the page using the meta tag, the page is reloaded and the data in the table is gone.

  • 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-05T18:05:56+00:00Added an answer on June 5, 2026 at 6:05 pm

    I would like to reload the page after every 5 mins to refresh the data in the table.

    Not quite. You want to reload the data every five minutes so that you can refresh the table in the page.

    You should use setTimeout somewhere, perhaps even in your view’s initialize:

    start_reloader: function() {
        var _this = this;
        this.timer = setTimeout(function() {
            $.ajax({
                // Load the data from your server...
                success: function(data) {
                    _this.redraw_the_table(data);
                    _this.start_reloader();
                }
            });
        }, 5*60*1000);
    },
    
    initialize: function() {
        this.start_reloader();
    }
    

    And then you’d want something in your remove to kill the timer:

    remove: function() {
        if(this.timer)
            clearTimeout(this.timer);
        return Backbone.View.prototype.remove.apply(this);
    }
    

    You could also use setInterval and clearInterval but there is a (small) chance that they can pile up on each other if there are delays in the AJAX calls.

    You don’t have to manage this in the view of course. Setting up a model or collection to reload itself from the server every five minutes might make more sense in your case; then, your view would bind to the model’s or collection’s events as usual and redraw the table in response to 'reset', 'change', … events from the model/collection.

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

Sidebar

Related Questions

I'm trying to use backbone.js with underscore.js templates in an asp.net web forms application
I'm trying to set up my first Backbone Model that implements RESTful WCF services.
what is the advantage/ reason for backbone-js to use the syntax //using a Model
I'm using require.js to help organize my Backbone.js based application. I'm trying to figure
I'm trying to use the example mentioned for using the previous api in Backbone's
I'm using Backbone.js 0.9.2 from the Backbone-on-rails gem. I'm also trying to use the
I'm trying to use CoffeeScript with Backbone.js (via Brunch) and I want to implement
I have some test code that i'm just trying to use to figure out
im starting to use Backbone.js and im trying to do somthing simple with javascript,
I'm trying to write my first mixin for use across different backbone projects, and

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.