how to disable browser's back button after logout ?
12 answers - 525 bytes -

this may be posted before though i can not find any in the archive:
how to make sure that browser's back button will bring back the previous
page after log out ?
Googled, and added these into our logout action, but still no effect:
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Cache-Control", "no-store");
response.setDateHeader("Expires", -1);
response.setHeader("Pragma", "no-cache"); // http 1.0
any idea ?
thanks in advance
lx
No.1 | | 410 bytes |
| 
6/25/06, Lixin Chu <lixin.chu (AT) gmail (DOT) comwrote:
is there a clearner way of doing this if I want to protect every page except
the login/out ?
What about the 'nocache' attribute of <controllerin
struts-config.xml? I haven't used it, just had occasion to be reading
the DTD the other day :)
(choose 'controller' at left, scroll up for docs.)
No.2 | | 1070 bytes |
| 
I see. thanks so much. was really confused.
6/25/06, Paul Benedict <paul4christ79 (AT) yahoo (DOT) comwrote:
Lixin, you have your needs reversed: you need those directives on every
page that's secure. The pages your users see only when they log in should
not be written to the browser's cache; the log out page is benign. -- Paul
--
Lixin Chu <lixin.chu (AT) gmail (DOT) comwrote: this may be posted before though i
can not find any in the archive:
how to make sure that browser's back button will bring back the previous
page after log out ?
Googled, and added these into our logout action, but still no effect:
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Cache-Control", "no-store");
response.setDateHeader("Expires", -1);
response.setHeader("Pragma", "no-cache"); // http 1.0
any idea ?
thanks in advance
lx
>
>
>
Want to be your own boss? Learn how on Yahoo! Small Business.
No.3 | | 106 bytes |
| 
is there a clearner way of doing this if I want to protect every page except
the login/out ?
No.4 | | 668 bytes |
| 
6/25/06, Paul Benedict <paul4christ79 (AT) yahoo (DOT) comwrote:
Wendy, is the link to the live dtd on the site? i think it should be a first-level item on the Struts site, or at least in Action 1. Looking at DTD's online is very valuable and something I need often.
It's linked from Section 4.8 at the bottom.
*
Before we make the LiveDTD docs more visible, at least one other
person needs to volunteer to maintain them. They are not part of the
Maven 2 website build, LiveDTD is a Perl script that I run
occasionally, then upload the results.
Ask on dev@ if you need more info, the instructions are on the wiki:
No.5 | | 1174 bytes |
| 
6/25/06, Paul Benedict <paul4christ79 (AT) yahoo (DOT) comwrote:
Wendy, then I opt for the simplest solution. Can a text version of the DTD be made online on the site? This is my thinking:
How is that (much) different than what we've got? The DTDs are
already available online in both "plain text" and framed HTML
(LiveDTD) format.
http://struts.apache.org/dtds/
The one annoying thing is that when I click the link to the dtd
itself, I'm prompted to download it. However, that doesn't happen
with Sun's DTDs [1] so I assume it's just some configuration on the
web server. Does anyone know how to fix that?
Craig made a good point about the DTDs having valuable information in
the comments, and while I don't necessarily want them in the 'lib'
distribution, I would like to get them included in the Maven website
build, so that they are also included in the 'docs' directory of the
'all' distribution.
We generally don't check in anything that can be generated, and IM
the HTML version of the DTD falls into that category.
[1]
No.6 | | 1232 bytes |
| 
6/25/06, Paul Benedict <paul4christ79 (AT) yahoo (DOT) comwrote:
Didn't you say you didn't want to support the live dtd? My browsers can never show a DTD, it seems; they try always parse it as XML which fails of course. So that's why I recommend a plain-text version of it online.
No, I said that currently I'm the only one who has volunteered to keep
the LiveDTD docs updated. If someone else will help, then I'd feel
more comfortable about making those links more prominent on the
website. It's not hard, but it is outside of the Maven 2 website
build.
Having a plain text version under s.a.o/struts-action is fine, it just
needs to happen at build time, not as something that gets checked into
svn. Try binding an execution of the antrun plugin in action/pom.xml,
that's the only thing I've found that will copy files in a Maven
build. There should be an example in the webapp poms, I know we copy
the source into the webapps with antrun.
Another option is switching to DTD Doc, which is Java so it shouldn't
be too hard to write a m2 plugin for it. That looks like it requires
modifications to the source DTDs, though.
No.7 | | 543 bytes |
| 
6/25/06, James Mitchell <jmitchell (AT) apache (DOT) orgwrote:
Sounds like something we could run nightly from the zone.
Yes, it could but if we care about it, this really needs to be part of
the standard build process somehow.
Personally, I find the existing DTDs themselves (which are *very* thoroughly
commented) to be quite readable on their own, and they are already
available both online and as part of the build -- so having the indexed
version is a nice-to-have, not a mission critical feature, IMH
No.8 | | 57 bytes |
| 
Sounds like something we could run nightly from the zone.
No.9 | | 560 bytes |
| 
yes, it works. thanks. this should be the simplest way of supporting this.
6/26/06, Wendy Smoak <wsmoak (AT) gmail (DOT) comwrote:
6/25/06, Lixin Chu <lixin.chu (AT) gmail (DOT) comwrote:
is there a clearner way of doing this if I want to protect every page
except
the login/out ?
What about the 'nocache' attribute of <controllerin
struts-config.xml? I haven't used it, just had occasion to be reading
the DTD the other day :)
(choose 'controller' at left, scroll up for docs.)
No.10 | | 107 bytes |
| 
So, if this became a Maven 2 plugin, would anyone have a problem with
us adding it to the nightly build?
No.11 | | 423 bytes |
| 
6/26/06, Paul Benedict <paul4christ79 (AT) yahoo (DOT) comwrote:
I have written MJ What is the bill? I'll ring it up if someone can spell it out.
Are we still talking about LiveDTD? The instructions are on the wiki
(at the bottom):
Alternately, look at DTDDoc, which is Java and should be much easier
to write a plugin for, though it will require re-formatting the DTD
comments.
*
No.12 | | 258 bytes |
| 
6/26/06, James Mitchell <jmitchell (AT) apache (DOT) orgwrote:
So, if this became a Maven 2 plugin, would anyone have a problem with
us adding it to the nightly build?
+1 from me if the necessary stuff is available in Maven repositories.