title: Browser back button getting in to GET method of Spring MVC Controller instead of checking the cache
body: <p>I am using Spring MVC 2.5. I have get and post methods for all the pages I have. </p>
  
  <pre><code>    @RequestMapping(value = "/offer", method = RequestMethod.GET)
      public ModelAndView getOffer(ModelMap model, HttpSession session) {
  
  //code
  
          return new ModelAndView(OFFER_SETTING_PAGE, model);
      }
  
  
    @RequestMapping(value = "/offer", method = RequestMethod.POST)
      public ModelAndView postOffer(ModelMap model, @ModelAttribute("investorsEligiblitySetting")        
  
         //code
  
          return new ModelAndView("redirect:/servlets/ProcessAction/privateplacement/createoffer/additionalinformation");
      }
  </code></pre>
  
  <p>After passing the post method and displaying the next jsp file, when I try to hit the back button , instead of displaying the previous data from the cache (which is what I am looking for) it gets in to the get method of the specified url and causes some problems.</p>
  
  <p>How can I make my application to look for cache first instead of getting in to a get method?</p>