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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:59:41+00:00 2026-06-06T04:59:41+00:00

On my MVC spring application I send a form to a page using post

  • 0

On my MVC spring application I send a form to a page using post method to perform a search with some parameters. The results of the search is a list and, for every entry is possible to navigate to a details page. It works fine but, when an user try to come back to result page with back browser button (or a Javascript), I get an “Expire page” error. Refreshing the page, it rexecutes the post submit and it works fine.

To prevent this error I added

response.setHeader("Cache-Control", "no-cache");

to the search controller and everything works fine with Safari and Firefox but I get the same “Expire page” error when I try to execute the web application with IE (8 and 9).

What’s the right way to go to a detail page and come back without getting any error?

thanks for your time!
Andrea

  • 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-06T04:59:42+00:00Added an answer on June 6, 2026 at 4:59 am

    The right way is to use GET instead of POST: searching is an idempotent operation which doesn’t cause any change on the server, and such operations should be done with a GET.

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

Sidebar

Related Questions

I'm using Spring's form tag library in a Spring MVC application that I am
In my Spring MVC application I am using DTO in the presentation layer in
I'm using itext to generate pdf in my spring mvc application. The pdf is
I'm currently working on a web application using Spring MVC, and I use the
I have a simple Spring MVC application that looks up some user details from
I am trying to send email using gmail from my mvc application. I am
I am developing a spring mvc based application. I have a simple pojo form
I am using Spring MVC for my web application and I am using my
I am using Spring MVC for my web application and I am integrating Velocity
I've got a spring-application (Spring Roo uses Spring MVC) on a Tomcat-server. There are

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.