• 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

setting response headers

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am working with Grails 1.1.I have a userLogin action which validates a username and password and forwards to the view.In the view I am displaying a message like "Welcome ......$(username)" which is displaying the correct username.But when I press Ctrl+N keys and open another browser window(firefox) it still displays the same message.I am trying to display the default page and not the one where the user has already logged in.I have also tried setting the following response headers

response.Pragma='no-cache'
response.Cache-Control='no-cache'
response.Expires='-1'

in the userLoging action but for some reason the browser doesn't seem to clear the cache.Could somebody please guide me in the right direction.

Regards
bond
 
charu shila
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All
Could somebody please help me with this?

regards
 
author
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suspect your problem is due to the session. Once a browser has a session cookie, it will always send that cookie to the server. You either have to log out or open a different browser (such as Opera). I gather that there are ways to get round this, but I don't know what they are.

Cheers,

Peter
 
Ranch Hand
Posts: 686
Netbeans IDE Chrome Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Happens for me too if you are using Single Sign on. I believe that is a feature!
 
reply
    Bookmark Topic Watch Topic
  • New Topic