Re: Action.execute() only being invoked the first time a url is requested ??!!!
Thanks Wendy Alas, I ended up uninstalling Ethereal, a while ago, due to system issues. --- Laurie Harper <[EMAIL PROTECTED]> wrote: > Do you get that behaviour *with* the cache control > stuff in place or > without it? If without, have you checked the > response (say with > Ethereal) to see if there are Expires or other > caching-related headers > being included by something else? > > L. > > Mon Cab wrote: > > It's understandable that my browser would retireve > > from cache when I hit the back button. BUT: > Should my > > browser also be retrieving from cache when I click > on > > the same url twice, even if the url/uri is a get > > request. > > > > I am implementing a logout link as follows: > > login.do?use_case=logout > > > > When I click on this link twice my > Action.execute() is > > not being invoked. According to the HTTP > > Specification (section 13.9 - > > > http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13): > > > > since some applications have traditionally used > GETs > > and HEADs with query URLs (those containing a "?" > in > > the rel_path part) to perform operations with > > significant side effects, caches MUST NOT treat > > responses to such URIs as fresh unless the server > > provides an explicit expiration time. This > > specifically means that responses from HTTP/1.0 > > servers for such URIs SHOULD NOT be taken from a > > cache. See section 9.1.1 for related information. > > > > > > > > > > --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > > > > >> Browser is not obliged to reload non-cached page > >> when a user navigates > >> back in browser page history. Quite the opposite, > >> they must present > >> the resourse in the same state it was accessed > for > >> the first time. > >> Opera does not reload a page, even with > >> cache-control settings telling > >> to not cache a page. MSIE reloads page when it > sees > >> "no-cache". > >> Firefox reloads a page when it sees "no-store" or > >> the page is secured > >> by SSL and returned as "no-cache". > >> > >> Usually "no-cache, no-store" is enough for most > >> browsers, but not for Opera. > >> > >> Michael. > >> > >> > > > - > >> To unsubscribe, e-mail: > >> [EMAIL PROTECTED] > >> For additional commands, e-mail: > >> [EMAIL PROTECTED] > >> > >> > > > > > > > > > > __ > > Start your day with Yahoo! - Make it your home > page! > > http://www.yahoo.com/r/hs > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action.execute() only being invoked the first time a url is requested ??!!!
Got it. Thanks Michael. --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > On 11/25/05, Mon Cab <[EMAIL PROTECTED]> wrote: > > It's understandable that my browser would retireve > > from cache when I hit the back button. BUT: > Should my > > browser also be retrieving from cache when I click > on > > the same url twice, even if the url/uri is a get > > request. > > Yes, it might do so if page is cacheable. It must > reload page from the > server if you reload it explicitly with "Reload" > button. > > > I am implementing a logout link as follows: > > login.do?use_case=logout > > > > When I click on this link twice my > Action.execute() is > > not being invoked. According to the HTTP > > Specification (section 13.9 - > > > http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13): > > > > since some applications have traditionally used > GETs > > and HEADs with query URLs (those containing a "?" > in > > the rel_path part) to perform operations with > > significant side effects, caches MUST NOT treat > > responses to such URIs as fresh unless the server > > provides an explicit expiration time. > > Is it server's or browser's problem that "some > applications have > traditionally used" HTTP protocol not the way it was > intended to do? > GET requests are meant to produce no side effects. > To be on the safe > side, just return the proper cache-control headers. > On Firefox, the > headers are easy to spot with Live HTTPHeaders > extension. > > Michael. > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action.execute() only being invoked the first time a url is requested ??!!!
On 11/25/05, Mon Cab <[EMAIL PROTECTED]> wrote: > It's understandable that my browser would retireve > from cache when I hit the back button. BUT: Should my > browser also be retrieving from cache when I click on > the same url twice, even if the url/uri is a get > request. Yes, it might do so if page is cacheable. It must reload page from the server if you reload it explicitly with "Reload" button. > I am implementing a logout link as follows: > login.do?use_case=logout > > When I click on this link twice my Action.execute() is > not being invoked. According to the HTTP > Specification (section 13.9 - > http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13): > > since some applications have traditionally used GETs > and HEADs with query URLs (those containing a "?" in > the rel_path part) to perform operations with > significant side effects, caches MUST NOT treat > responses to such URIs as fresh unless the server > provides an explicit expiration time. Is it server's or browser's problem that "some applications have traditionally used" HTTP protocol not the way it was intended to do? GET requests are meant to produce no side effects. To be on the safe side, just return the proper cache-control headers. On Firefox, the headers are easy to spot with Live HTTPHeaders extension. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action.execute() only being invoked the first time a url is requested ??!!!
Do you get that behaviour *with* the cache control stuff in place or without it? If without, have you checked the response (say with Ethereal) to see if there are Expires or other caching-related headers being included by something else? L. Mon Cab wrote: It's understandable that my browser would retireve from cache when I hit the back button. BUT: Should my browser also be retrieving from cache when I click on the same url twice, even if the url/uri is a get request. I am implementing a logout link as follows: login.do?use_case=logout When I click on this link twice my Action.execute() is not being invoked. According to the HTTP Specification (section 13.9 - http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13): since some applications have traditionally used GETs and HEADs with query URLs (those containing a "?" in the rel_path part) to perform operations with significant side effects, caches MUST NOT treat responses to such URIs as fresh unless the server provides an explicit expiration time. This specifically means that responses from HTTP/1.0 servers for such URIs SHOULD NOT be taken from a cache. See section 9.1.1 for related information. --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: Browser is not obliged to reload non-cached page when a user navigates back in browser page history. Quite the opposite, they must present the resourse in the same state it was accessed for the first time. Opera does not reload a page, even with cache-control settings telling to not cache a page. MSIE reloads page when it sees "no-cache". Firefox reloads a page when it sees "no-store" or the page is secured by SSL and returned as "no-cache". Usually "no-cache, no-store" is enough for most browsers, but not for Opera. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action.execute() only being invoked the first time a url is requested ??!!!
It's understandable that my browser would retireve from cache when I hit the back button. BUT: Should my browser also be retrieving from cache when I click on the same url twice, even if the url/uri is a get request. I am implementing a logout link as follows: login.do?use_case=logout When I click on this link twice my Action.execute() is not being invoked. According to the HTTP Specification (section 13.9 - http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13): since some applications have traditionally used GETs and HEADs with query URLs (those containing a "?" in the rel_path part) to perform operations with significant side effects, caches MUST NOT treat responses to such URIs as fresh unless the server provides an explicit expiration time. This specifically means that responses from HTTP/1.0 servers for such URIs SHOULD NOT be taken from a cache. See section 9.1.1 for related information. --- Michael Jouravlev <[EMAIL PROTECTED]> wrote: > Browser is not obliged to reload non-cached page > when a user navigates > back in browser page history. Quite the opposite, > they must present > the resourse in the same state it was accessed for > the first time. > Opera does not reload a page, even with > cache-control settings telling > to not cache a page. MSIE reloads page when it sees > "no-cache". > Firefox reloads a page when it sees "no-store" or > the page is secured > by SSL and returned as "no-cache". > > Usually "no-cache, no-store" is enough for most > browsers, but not for Opera. > > Michael. > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action.execute() only being invoked the first time a url is requested ??!!!
Michael Jouravlev wrote: On 11/19/05, Laurie Harper <[EMAIL PROTECTED]> wrote: This clearly implies that the brower caches the page and displays that when you click back... All that implies is that the dynamic content hasn't changed. Unless the page has data on it that you know should be different on every page load. Browser is not obliged to reload non-cached page when a user navigates back in browser page history. Quite the opposite, they must present the resourse in the same state it was accessed for the first time. Opera does not reload a page, even with cache-control settings telling to not cache a page. MSIE reloads page when it sees "no-cache". Firefox reloads a page when it sees "no-store" or the page is secured by SSL and returned as "no-cache". Usually "no-cache, no-store" is enough for most browsers, but not for Opera. That's a useful overview, thanks Michael! I don't suppose you happen to know a solution that doesn't break IE for file downloads do you? (If you're not familiar with the problem, it effects downloads for file types IE is configured to open automatically, such as Office documents; with caching disabled IE will delete the file, as it should, but it deletes it before trying to *open* it, so no application opens and you get no file on disk...) L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action.execute() only being invoked the first time a url is requested ??!!!
On 11/19/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > > This clearly implies that the brower caches the page and displays that when > > you click back... > > All that implies is that the dynamic content hasn't changed. Unless the > page has data on it that you know should be different on every page load. Browser is not obliged to reload non-cached page when a user navigates back in browser page history. Quite the opposite, they must present the resourse in the same state it was accessed for the first time. Opera does not reload a page, even with cache-control settings telling to not cache a page. MSIE reloads page when it sees "no-cache". Firefox reloads a page when it sees "no-store" or the page is secured by SSL and returned as "no-cache". Usually "no-cache, no-store" is enough for most browsers, but not for Opera. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action.execute() only being invoked the first time a url is requested ??!!!
Vishal Dalal wrote: Hi, sorry for intervening. Actually my query is realted to the Caching part... Actually i wanted to ask, do placing all these paramteres actually guarantee that the page will be cached, because i think not. Browsers aren't terribly consistent about how they interpret the various caching-related headers, but that should work. You can also tell Struts to do this for you by configuring the controller in struts-config.xml to avoid having to add all that code to every JSP. I myself have tried writing all this code in the page. Then when you go forward from this page and click back, then the same content is displayed as was done before... This clearly implies that the brower caches the page and displays that when you click back... All that implies is that the dynamic content hasn't changed. Unless the page has data on it that you know should be different on every page load. L. Please point out in case i am going wrong or if my logic is incorrect.. Thanks for reading -Vishal -Original Message- From: atta-ur rehman [mailto:[EMAIL PROTECTED] Sent: Friday, November 18, 2005 12:39 PM To: Struts Users Mailing List Subject: Re: Action.execute() only being invoked the first time a url is requested ??!!! Hi, Most probably your page is gettnig cached by the browser. try or <% response.setHeader("pragma", "no-cache"); response.setHeader("Cache-Control", "no-cache"); response.setHeader("Cache-Control", "no-store"); response.setDateHeader("Expires", 0); %> to keep your browser from caching the page and see if it works. HTH. ATTA On 11/17/05, Mon Cab <[EMAIL PROTECTED]> wrote: For Example if I type in my browser address bar: http://127.0.0.1:8080/webapp/userSignup.do?action=whatever The first time, I type this in, this invokes the execute method of my Action class (I'm using System.out ("Action execute Invoked") in Action execute to test this). If I then enter the exact same url, this method is not getting called. I am not using validator at all!! Can anyone explain what is going on with this? __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Make your callers hear anything you like.Call 456 say DIALER TONES. An idea can change your life. ** LEGAL DISCLAIMER This E-Mail may contain Confidential and/or legally privileged Information and is meant for the intended recipient(s) only. If you have received this e-mail in error and are not the intended recipient/s, kindly notify us at [EMAIL PROTECTED] and then delete this e-mail immediately from your system. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail, its contents or its attachment/s other than by its intended recipient/s is strictly prohibited and may be unlawful. Internet Communications cannot be guaranteed to be secure or error-free as information could be delayed, intercepted, corrupted, lost, or contain viruses. IDEA Cellular Limited does not accept any liability for any errors, omissions, viruses or computer problems experienced by any recipient as a result of this e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action.execute() only being invoked the first time a url is requested ??!!!
On 11/18/05, Mon Cab <[EMAIL PROTECTED]> wrote: > Thanks Atta. It is reloading the pages now. > > PS. Is this default behaviour for STRUTS? And if so, > do you know why? It seems to me that the default > should should be not to cache pages with dynamic > content. > > Is there a way to configure this in Tomcat or in the > struts config? struts-config.xml: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action.execute() only being invoked the first time a url is requested ??!!!
Thanks Atta. It is reloading the pages now. PS. Is this default behaviour for STRUTS? And if so, do you know why? It seems to me that the default should should be not to cache pages with dynamic content. Is there a way to configure this in Tomcat or in the struts config? --- atta-ur rehman <[EMAIL PROTECTED]> wrote: > Hi, > > Most probably your page is gettnig cached by the > browser. try > > > > > > > > > or > > <% > response.setHeader("pragma", "no-cache"); > response.setHeader("Cache-Control", "no-cache"); > response.setHeader("Cache-Control", "no-store"); > response.setDateHeader("Expires", 0); > %> > > to keep your browser from caching the page and see > if it works. > > HTH. > > ATTA > > On 11/17/05, Mon Cab <[EMAIL PROTECTED]> wrote: > > > > > > For Example if I type in my browser address bar: > > > > > http://127.0.0.1:8080/webapp/userSignup.do?action=whatever > > > > The first time, I type this in, this invokes the > > execute method of my Action class (I'm using > > System.out ("Action execute Invoked") in Action > > execute to test this). If I then enter the exact > same > > url, this method is not getting called. > > > > I am not using validator at all!! > > > > Can anyone explain what is going on with this? > > > > > > > > > > __ > > Yahoo! FareChase: Search multiple travel sites in > one click. > > http://farechase.yahoo.com > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Action.execute() only being invoked the first time a url is requested ??!!!
Hi, sorry for intervening. Actually my query is realted to the Caching part... Actually i wanted to ask, do placing all these paramteres actually guarantee that the page will be cached, because i think not. I myself have tried writing all this code in the page. Then when you go forward from this page and click back, then the same content is displayed as was done before... This clearly implies that the brower caches the page and displays that when you click back... Please point out in case i am going wrong or if my logic is incorrect.. Thanks for reading -Vishal -Original Message- From: atta-ur rehman [mailto:[EMAIL PROTECTED] Sent: Friday, November 18, 2005 12:39 PM To: Struts Users Mailing List Subject: Re: Action.execute() only being invoked the first time a url is requested ??!!! Hi, Most probably your page is gettnig cached by the browser. try or <% response.setHeader("pragma", "no-cache"); response.setHeader("Cache-Control", "no-cache"); response.setHeader("Cache-Control", "no-store"); response.setDateHeader("Expires", 0); %> to keep your browser from caching the page and see if it works. HTH. ATTA On 11/17/05, Mon Cab <[EMAIL PROTECTED]> wrote: > > > For Example if I type in my browser address bar: > > http://127.0.0.1:8080/webapp/userSignup.do?action=whatever > > The first time, I type this in, this invokes the > execute method of my Action class (I'm using > System.out ("Action execute Invoked") in Action > execute to test this). If I then enter the exact same > url, this method is not getting called. > > I am not using validator at all!! > > Can anyone explain what is going on with this? > > > > > __ > Yahoo! FareChase: Search multiple travel sites in one click. > http://farechase.yahoo.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > Make your callers hear anything you like.Call 456 say DIALER TONES. An idea can change your life. ** LEGAL DISCLAIMER This E-Mail may contain Confidential and/or legally privileged Information and is meant for the intended recipient(s) only. If you have received this e-mail in error and are not the intended recipient/s, kindly notify us at [EMAIL PROTECTED] and then delete this e-mail immediately from your system. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail, its contents or its attachment/s other than by its intended recipient/s is strictly prohibited and may be unlawful. Internet Communications cannot be guaranteed to be secure or error-free as information could be delayed, intercepted, corrupted, lost, or contain viruses. IDEA Cellular Limited does not accept any liability for any errors, omissions, viruses or computer problems experienced by any recipient as a result of this e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action.execute() only being invoked the first time a url is requested ??!!!
Hi, Most probably your page is gettnig cached by the browser. try or <% response.setHeader("pragma", "no-cache"); response.setHeader("Cache-Control", "no-cache"); response.setHeader("Cache-Control", "no-store"); response.setDateHeader("Expires", 0); %> to keep your browser from caching the page and see if it works. HTH. ATTA On 11/17/05, Mon Cab <[EMAIL PROTECTED]> wrote: > > > For Example if I type in my browser address bar: > > http://127.0.0.1:8080/webapp/userSignup.do?action=whatever > > The first time, I type this in, this invokes the > execute method of my Action class (I'm using > System.out ("Action execute Invoked") in Action > execute to test this). If I then enter the exact same > url, this method is not getting called. > > I am not using validator at all!! > > Can anyone explain what is going on with this? > > > > > __ > Yahoo! FareChase: Search multiple travel sites in one click. > http://farechase.yahoo.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >