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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:41:22+00:00 2026-05-31T10:41:22+00:00

I’ve implemented a website in .jsp / JSTL / EL that works fine. However,

  • 0

I’ve implemented a website in .jsp / JSTL / EL that works fine. However, depending on the browser (!), the behavior of the back button is varying a bit.

I did take care to not have double post (so that the browser does not warn the user that he’s going to post again) but then apparently this leads to another issue: if I use the back button from Chrome, then the value of the checkboxes aren’t correct.

Here’s the scenario as I understand it:

  1. user is on page /page1 then checks a checkbox
  2. a POST is made, there’s a HTTP redirect
  3. a GET is made, page /page2 displays fine, with the checkbox checked as it should be
  4. user hits the back button
  5. user goes back to /page1 as it was before the checkbox was checked (which is exactly the expected behavior for the back button) but the checkbox is still checked.

From looking at the server’s log and my application’s log as far as I can see there’s absolutely nothing transmitted to the webserver. So it’s purely on the client side that things are happening.

What is going on and how can I fix this? (without using a framework, it’s not what this question is about)

EDIT I should probably give a bit more info… The webapp is already a bit “fancy” in that each page served –in a tiny URL-like fashion– corresponds to a state. Everything is “public”: anyone can see anyone’s pages (but it could be private, with private URLs). Anyway: if a user shares any of its page, when another user shall open a page it shall display correctly and the checkboxes are correctly initialized.

All this to say that the problem is not on the server side, where the “state” somehow wouldn’t be correct: if user A share pages …/1d2eof then user B opening the page …/1d2eof shall see the correct page.

The only times where this gets messed up is when the user uses the back button. Remember that, at any point, I’ve got the full page’s state accessible on the server side. However my issue is that apparently when using the back button nothing contacts my server, so I don’t get the chance to “fix the page” for the user who used the back button.

Maybe a double redirect would 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-05-31T10:41:24+00:00Added an answer on May 31, 2026 at 10:41 am

    This is a browser feature: pressing the “back” button will restore the final state of the form. If you want to reset the form contents to what was specified in the HTML (i.e., to a state before user interaction), you can use document.formName.reset(), where formName is the name of the form. (Unfortunately, it’s a bit hard to detect that the user has hit the “back” button and returned to the current page, so it’s tricky to figure out when to run the above bit of code.)

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

Sidebar

Related Questions

I used javascript for loading a picture on my website depending on which small
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I need a function that will clean a strings' special characters. I do NOT

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.