You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Sayoke Shome <sa...@TechMahindra.com> on 2006/10/17 13:33:45 UTC
Browser back problem : Does Ofbiz has implicit session management?
Hi all,
I am developing a shopping cart for some configurable good (Say
configurable pc). Since it is little complex configuration, my
requirement is to make sure that if user clicks on browser back button
instead of the back button I have provided him, page should expire. And
show "this page has expired". And when user clicks refresh on that
expired page he is brought back on the page he was previously.
To achieve this, the first thing is to make sure explicitly that there
is no page cached by the browser. I have used following code in header
ftl:
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Cache-Control" content="no-store,
no-cache, must-revalidate">
<meta http-equiv="Cache-Control" content="post-check=0,
pre-check=0, false">
also I have tried using :
UtilHttp.setResponseBrowserProxyNoCache(request,response);
in bsh files.
But still the first page loading in the browser is "disk cached". Next
pages are not cached. Consequently if I am clicking browser back on any
page, it is taking me back to the disk cached first page.
Can anybody suggest me any workaround so that not a single page is
cached and clicking on the browser back will give me
message like "This page has been expired".
Thanks in advance,
Sayoke Shome | Technical Associate | Techmahindra Ltd. | Gigaspace
gama 1 ,Vimannagar, Pune | India
============================================================================================================================
Tech Mahindra, formerly Mahindra-British Telecom.
Disclaimer:
This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review at <a href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a> externally and <a href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a> internally within Tech Mahindra.
============================================================================================================================
Re: Browser back problem : Does Ofbiz has implicit session management?
Posted by David E Jones <jo...@undersunconsulting.com>.
It sounds like you're running into certain pages which aren't getting
these changes as expected, so you may want to verify that the server
is sending these down for all of the pages you expect. It's been a
long time since I've done this kind of stuff, but I do remember that
you have to be careful with capitalization and that different
browsers do tend to respond differently to these different
directives... So, browser-specific research is generally required if
you're running into a problem.
In general I'd highly recommend against doing this sort of thing. It
tends to make applications very difficult and error-prone to build
(in other words, you WILL run into nearly constant problems), and it
really tends to annoy users, and annoy them a lot.
The better approach is to design page flows to not force the user
down certain paths, but allow them to move around as desired and just
make sure each page knows how to re-populate its data (for forms and
such), and that some sort of progress bar is around and intelligent
enough to know which pages are complete in the process, and therefore
allow users to go to the next step.
-David
On Oct 17, 2006, at 12:33 PM, Sayoke Shome wrote:
>
> Hi all,
>
> I am developing a shopping cart for some configurable good (Say
> configurable pc). Since it is little complex configuration, my
> requirement is to make sure that if user clicks on browser back button
> instead of the back button I have provided him, page should expire.
> And
> show "this page has expired". And when user clicks refresh on that
> expired page he is brought back on the page he was previously.
>
>
>
> To achieve this, the first thing is to make sure explicitly that there
> is no page cached by the browser. I have used following code in header
> ftl:
>
> <meta http-equiv="Pragma" content="no-cache">
>
> <meta http-equiv="Expires" content="-1">
>
> <meta http-equiv="Cache-Control" content="no-store,
> no-cache, must-revalidate">
>
> <meta http-equiv="Cache-Control" content="post-check=0,
> pre-check=0, false">
>
>
>
> also I have tried using :
>
>
>
> UtilHttp.setResponseBrowserProxyNoCache(request,response);
>
> in bsh files.
>
>
>
> But still the first page loading in the browser is "disk cached". Next
> pages are not cached. Consequently if I am clicking browser back on
> any
> page, it is taking me back to the disk cached first page.
>
>
>
> Can anybody suggest me any workaround so that not a single page is
> cached and clicking on the browser back will give me
>
> message like "This page has been expired".
>
>
>
> Thanks in advance,
>
>
>
> Sayoke Shome | Technical Associate | Techmahindra Ltd. | Gigaspace
> gama 1 ,Vimannagar, Pune | India
>
>
>
>
>
> ======================================================================
> ======================================================
>
> Tech Mahindra, formerly Mahindra-British Telecom.
>
> Disclaimer:
>
> This message and the information contained herein is proprietary
> and confidential and subject to the Tech Mahindra policy statement,
> you may review at <a href="http://www.techmahindra.com/
> Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a>
> externally and <a href="http://tim.techmahindra.com/
> Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a>
> internally within Tech Mahindra.
>
> ======================================================================
> ======================================================