• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

no-cache not expiring web page

 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the below servlet A i am able to get the no cache to work so when i hit the back button the page is expired.

I am using this same exact code in another servlet. The only differenc i can think of is the i am using the PRG patten with it. So i do a process then it redirects to servlet B and displays the invoice page. However if i hit back from here the page is not expired and will still display.

any ideas?

thanks john


SERVLET A


SERVLET B



[ December 06, 2008: Message edited by: John Schretz ]

[ December 06, 2008: Message edited by: John Schretz ]
[ December 06, 2008: Message edited by: John Schretz ]
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As you are aware, the whole point of the PRG pattern is to prevent double submit when you refresh the result page after a post request. Hence using a redirect instructs the browser to initiate a brand new request. So you are not getting a "page expired" error message anymore when you go back to the previous page which is not been cached by the browser.

I think this is what is happening. However, the more knowledgeableand very helpful folks here will probably have a better explanation.
[ December 06, 2008: Message edited by: Bosun Bello ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic