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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:37:33+00:00 2026-05-12T06:37:33+00:00

Right now the biggest issue I’m having with using AJAX is the fact that

  • 0

Right now the biggest issue I’m having with using AJAX is the fact that if I use AJAX on a page, go to another page, then use the browser’s back button to go back anything that was changed with AJAX is gone.

I’ve thought about using the jQuery Addresss plugin to solve that problem but I don’t like how it only amends the URL with “#whatever.html” instead of changing it completely.

Ideally, what I would like is to have the URL go from: “www.example.com/p:2/” to “www.example.com/p:3/” when I make the relevant AJAX call.

Is this at all possible?

  • 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-12T06:37:33+00:00Added an answer on May 12, 2026 at 6:37 am

    Nope, this is not possible. Update: It is now possible via the HTML5 History API – see razbakov’s answer.

    I hope you realize that you are trying to address an extremely difficult problem.

    Let’s say your url looks like

    http://example.com/mypage/
    

    If you change the window location programmatically to

    http://example/mypage/1/
    

    Browser will take over and try to navigate to that page, there goes your fancy ajax code!

    So what’s the alternative? You use URL fragment.

    Let’s say you have a URL like this,

    http://example.com/anotherpage/#section
    

    Browser will first load http://example.com/anotherpage/ and try to find an anchor named ‘section’ and scroll to that location. This behavior is exploited by the ‘Addresses’ plugin. This is similar to how those ‘Scroll To Top’ links work.

    So if you are on the page

    http://example.com/mypage/
    

    and change the URL to

    http://example.com/mypage/#1
    

    Browser will not load new page but rather try to find anchor named ‘1’ and scroll to that anchor.

    Even if you have managed to add fragments to the URL, it doesn’t mean the work is done. If the user presses the back button, DOM will be reset and you will have to parse those fragments and recreate the DOM. It’s definitely non-trivial.

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

Sidebar

Related Questions

Right now, I keep all of my projects on my laptop. I'm thinking that
Right now I have an SSIS package that runs every morning and gives me
Right now, I have two Eclipse projects - they both use Maven 2 for
Right now, I have code that looks something like this: Private Sub ShowReport(ByVal reportName
Right now, my SVN repository is on my laptop's HDD (although I use a
One of biggest interest right now is iPhone development. I'm fixing to start putting
Right now we use DI/IOC and when we need to pass extra parameters to
Right now, I'm particularly interested in reading the data from MP3 files (ID3 tags?),
Right now my ant task looks like. <javadoc sourcepath=${source} destdir=${doc}> <link href=http://java.sun.com/j2se/1.5.0/docs/api/ /> </javadoc>
Right now I have a database (about 2-3 GB) in PostgreSQL, which serves as

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.