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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:07:58+00:00 2026-06-03T15:07:58+00:00

I have a search page which performs an ajax call then generates results (dynamic

  • 0

I have a search page which performs an ajax call then generates results (dynamic HTML) at the bottom of the page. The problem is when the user goes to a result (another site) then hits the back button, the original page and query are there, but the dynamic HTML is gone.

I have used the jquery history plugin before. This requires append “#pizza” to my URL if the user searches for pizza. And then whenever my page loads it could restore the state from what came after the #. But this would require remaking the ajax call, doing the search again, and constructing the dynamic HTML again.

Is it possible to structure things so when a user hits “back” the results page is instantly there exactly as it was before they left?

  • 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-03T15:08:00+00:00Added an answer on June 3, 2026 at 3:08 pm

    Some browsers will hold on to the page state on back, and some wont. Or they sometimes will, unless the browser tries to minimize memory usage. Bottom line, you can’t rely on it.

    So if you use mypage.html#content-hash style urls for ajax state you have to load an empty layout, when have JS handle the hash tag and rebuild the relevant page. This may be slower and take more requests, but that hash does NOT go to the server so JS is required to see what content is needed.

    Or if you use the HTML5 push state API you can change the full url of the window without a page reload. In this case, your server can render the whole page in the same state as it would have been setup as ajax. Browse some repositories on Github and you can see how they do this. Click a folder, it animates in and the url changes. Go directly to a subfolder via the URL and the page renders with that subfolders contents there already.

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

Sidebar

Related Questions

We have a page of search results which the user can hit in several
I have a search page which allows users to further filter thier results based
I have a search results page in which I have a search field at
Hi I have a search results page which returns queries form the database using
I have the following scenario. I have a search page which is split into
I have a search page in which I am searching data by passing multiple
I have xpath page.search(//table[@class='campaign']//table) which returns two tables. I need to choose only first
I have a search page that if there is results in the list it
I have a search page where I would like to stop the user entering
I have a search page which finds candidates. From this page you can click

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.