AW: [opencms-dev] Setting Browser Cache directives

Marcus Redeker mredeker at web.de
Mon Mar 28 17:43:17 CEST 2005


Alex,

thanks for your tip. I was looking into the welcome project which also has a
login element. 
This uses the cache direcitve (uri;user) and it seemt to work with my
firefox. 

Why do you have the <%@ page session="false" %> JSP directive in all of the
demopages?
Can this have todo with my problem since my JSP's don't have that?

How does OpenCMS maintain the session if this directive is not set?

Thanks again,

--Marcus
 

> -----Ursprüngliche Nachricht-----
> Von: opencms-dev-bounces at opencms.org 
> [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von 
> Alexander Kandzior
> Gesendet: Montag, 28. März 2005 16:45

> An: 'The OpenCms mailing list'
> Betreff: RE: [opencms-dev] Setting Browser Cache directives
> 
> The is because of the browser cache, many browsers don't even 
> ask the server
> again (at last for a day or so) once the have the page in the cache. 
> 
> The wayout of this is having an "expires" header set on the page.
> 
> You could try to put a "timeout" cache directive (property) to your
> templates or one of the incuded elements. OpenCms should then send and
> "expired" header set to the next expiration of the timeout, 
> which should
> solve the issue. 
> 
> Best Regards,
> Alex.
> 
> Alexander Kandzior
> Alkacon Software - The OpenCms Experts
> http://www.alkacon.com
> 
>  
> 
> > -----Original Message-----
> > From: opencms-dev-bounces at opencms.org 
> > [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Marcus Redeker
> > Sent: Sunday, March 27, 2005 9:50 PM
> > To: 'The OpenCms mailing list'
> > Subject: [opencms-dev] Setting Browser Cache directives
> > 
> > All,
> > 
> > what is the policy of OpenCMS and settings for brwoser cache? 
> > I am having trouble to get the pages displayed correctly 
> > because my browser is caching dynamic pages. OpenCMS should 
> > set the pragma and cache header on the response so that the 
> > browser (and maybe proxy) knows that they are not allowd to 
> > cache the page.
> > 
> > I implemented some kind of login funtionality and after a 
> > login the username should be displayed and not the login form 
> > anymore. But although the user logged in successfully the 
> > login form is still displayed.
> > 
> > I am using the code below in my template to decide whether to 
> > display the username or the login form.
> > 
> > Thanks,
> > 
> > --Marcus
> > 
> > ======== Snippet ======================
> > 
> > <%	
> >   // Create a JSP action element
> >   CmsJspActionElement cms = new 
> > CmsJspActionElement(pageContext, request, response);
> >   String currentUser = cms.user("name"); %>
> > 
> > <%
> >   if ( !currentUser.equals("Guest") )
> >   {
> > %>
> >           <!-- start logged in box -->
> >             <table cellspacing="0" class="login">
> >               <tr>
> >                 <td style="width:180px;"> </td>
> >               </tr>
> >               <tr>
> >                 <td><b class="involvaRed">Eingeloggt als 
> > <%=currentUser%></b></td>
> >               </tr>
> >               <tr>
> >                 <td class="logoutLink"><a 
> > href="?logout=yes">Logout</a> <a href="?logout=yes"><img 
> > src="<cms:link>../resources/images/logout.gif</cms:link>" width="16"
> > height="16" alt=""></a></td>
> >               </tr>
> >             </table>
> >           <!-- end logged in box -->
> > <%
> >   }
> >   else
> >   {
> > %>
> >           <!-- start log in box -->
> >             <form action='<%=cms.link("/login.jsp")%>' 
> method="post">
> >             <table cellspacing="0" class="loginForm">
> >               <tr>
> >                 <td style="width:180px;"> </td>
> >                 <td>
> >                   <input class="login" type="text" name="username"
> > value="Benutzer" onfocus="this.value='';"><br>
> >                   <input class="login" type="password" 
> name="password"
> > value="passwd" onfocus="this.value=''";>
> >                 </td>
> >                 <td style="padding-top:22px;"><input type="image"
> > src="<cms:link>../resources/images/go_button.gif")</cms:link>"
> >  width="18"
> > height="18" alt=""></td>
> >               </tr>
> >             </table>
> >             </form>
> >           <!-- end log in box -->
> > <%
> >   }
> > %>
> > 
> > ============================
> > 
> > 
> > 
> > _______________________________________________
> > This mail is send to you from the opencms-dev mailing list To 
> > change your list options, or to unsubscribe from the list, 
> > please visit http://mail.opencms.org/mailman/listinfo/opencms-dev
> > 
> > 
> 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, 
> please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
> 




More information about the opencms-dev mailing list