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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:55:05+00:00 2026-05-25T02:55:05+00:00

I need a browser page to maintain it’s post ajax changed state after the

  • 0

I need a browser page to maintain it’s post ajax changed state after the user navigates away and hits the back button to return to it. Unfortunately items previously faded out with jQuery are visible or dynamically added items (via ajax) disappear once the user hits the back button to return to a page.

I’ve tried about 20 different no-cache meta and header solutions and none seem to work in Chrome 13.0.782 for mac. I’ve also tried the onunload solution outlined here: Is there a cross-browser onload event when clicking the back button? to no avail.

Ideally I’d like the page state to remain the same (with all jQuery changes to the DOM) without having to reload it, but I would be happy with the ability to reload the page when a user navigates back to it.

I realize there are multiple questions about reloading after the back button is pressed, but none of the solutions work in my situation.

  • 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-25T02:55:06+00:00Added an answer on May 25, 2026 at 2:55 am

    A common practice, such as the one used by google is to append a hash value to the url. So for example, after you fade some divs out you could do

    window.location.hash = "hide_div"; 
    

    Then you would put a onHashChange listener

    $(window).bind('hashchange', function() {
        var hash_value = window.location.hash; 
    
       if ( hash_value === 'hide_div' ) 
            // hide certain divs
    });
    

    P.S This is a very rough pattern for maintaining ajax state.

    EDIT: I would suggest also taking a look at the History API in HTML5.

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

Sidebar

Related Questions

I need to cause a user's browser to post data using PHP to another
I need to logout on close page or on close browser ... as usual
I need to identify all html elements on a page in a browser agnostic
We have a browser test page which is used to diagnose user problems. There
I need to handle the browser back button in javascript. I have implemented the
Actually I need to know how this line is getting executed. Example: Browser(InternetExplorer).Page(Stackoverflow).WebElement(textbox).set user
I need to set the home page in browser, but setHomePage works only in
I need a cross browser way of capturing the right mouse click, preventing the
I need to implement a browser based component (most likely java applet since it
I need to lock the browser scrollbars when I show a div that represent

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.