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

  • Home
  • SEARCH
  • 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 8483547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:08:06+00:00 2026-06-10T20:08:06+00:00

Really starting to enjoy KnockoutJs (http://knockoutjs.com). Most of my web apps are ajax driven.

  • 0

Really starting to enjoy KnockoutJs (http://knockoutjs.com). Most of my web apps are ajax driven. The entire site is loaded and then from link to link we just change the body content via ajax calls.

When the ajax returns with new body content I can do my Knockout bindings. No problem. When I link to the next page (just an ajax call with replacing the body). The Knockout buildings, I would assume are still in memory, but not really bounded because the dom has changed. A few questions on this topic.

  1. If the next page does not have any Knockout on it is it really that bad to leave the knockout object sort of just lingering in memory? Better yet is there a way to reset (clear) the knockout object?

  2. When I go from one page that has knockout bindings to another that has knockout bindings does just calling ko.applyBindings() again clear out the old stuff and rebind the new stuff? (once again when I say going from one page to another I am just reloading the body with an ajax call).

  3. Does knockout have any “live” bindings. Sort of like jQuery’s live binding? This way Knockout could be loaded up front and then not have to be reapplied from content change to content change.

In general I am looking for advise on how to best use knockout from page to page in an app where the browser is not refreshing from page to page.

Thanks in advance for the help.

  • 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-10T20:08:08+00:00Added an answer on June 10, 2026 at 8:08 pm

    1) If the next page does not have any Knockout on it is it really that bad to leave the knockout object sort of just lingering in memory? Better yet is there a way to reset (clear) the knockout object?

    No, it’s not that bad; but if you’d really like to clean up then you can call ko.removeNode.


    2) When I go from one page that has knockout bindings to another that has knockout bindings does just calling ko.applyBindings() again clear out the old stuff and rebind the new stuff? (once again when I say going from one page to another I am just reloading the body with an ajax call).

    It depends.

    First of all, as GregT mentioned:

    One should not call applyBindings() more than once on the same DOM node(s).

    I know from experience – Calling ko.applyBindings() more than once on the same DOM node will cause a memory leak. [If you need to do this, then call ko.cleanNode().]

    OTOH, if you’re not calling ko.applyBindings() more than once on the same DOM node, then you should be fine because:

    KO will do some cleanup when adding/removing nodes. The typical time that this happens is when re-rendering a template.


    3) Does knockout have any “live” bindings. Sort of like jQuery’s live binding? This way Knockout could be loaded up front and then not have to be reapplied from content change to content change.

    Not that I know of, but if I understand your question correctly, you shouldn’t need any native Knockout functionality to implement what you need. You should be able to wire it up yourself with jQuery’s on() method (because live() has been deprecated).

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

Sidebar

Related Questions

I am really starting to enjoy unit testing and have the following question to
I am starting to build/design a new single page web application and really wanted
I'm a complete Xcode/Objective-C/Cocoa newbie but I'm learning fast and really starting to enjoy
I thought that I was really starting to understand how pointers work, and then
Okay this is probably a really dumb question, however it's really starting to hurt.
Recently I've gotten sick and tired of writing release notes and I'm really starting
I have never really done much C but am starting to play around with
I really like to have some graphic on my startup/login screen when starting my
This may be a really dumb question but I'm just starting to learn the
So I'm starting to catch the TDD bug but I'm wondering if I'm really

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.