You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by simon litwan <si...@wyona.com> on 2005/04/11 14:26:30 UTC

cache problem/http header fields

hi list

i'm facing a problem with a cached page. in the publication i'm working
on are the expires/modified-field (HTTP Header Fields) of the
oneFormEditor set. for all the other pages (as far as i see) in this
publication those fields are not specified.
the IE is using those fields to decide to cache the site or not. 
in the default publication are those filds not specified for the
oneFormEditor-page so the IE does'nt cache it. how does lenya handle the
HTTP Header Fields. 
maybee i'm digging in the wrong corner. any help would be great.

cheers 
simon


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: cache problem/http header fields

Posted by simon litwan <si...@wyona.com>.
Am Montag, den 11.04.2005, 18:10 +0200 schrieb Josias Thoeny:
> On Mon, 2005-04-11 at 18:00 +0200, simon litwan wrote:
> > Am Montag, den 11.04.2005, 17:38 +0200 schrieb Josias Thoeny:
> > > On Mon, 2005-04-11 at 16:24 +0200, simon litwan wrote:
> > > > > > > i'm facing a problem with a cached page. in the publication i'm working
> > > > > > > on are the expires/modified-field (HTTP Header Fields) of the
> > > > > > > oneFormEditor set. for all the other pages (as far as i see) in this
> > > > > > > publication those fields are not specified.
> > > > > > > the IE is using those fields to decide to cache the site or not. 
> > > > > > > in the default publication are those filds not specified for the
> > > > > > > oneFormEditor-page so the IE does'nt cache it. how does lenya handle the
> > > > > > > HTTP Header Fields. 
> > > > > > > maybee i'm digging in the wrong corner. any help would be great.
> > > > > > > 
> > > > > > 
> > > > > > I've had a similar problem with Xopus (IE was caching the documents),
> > > > > > and was able to solve it by adding the HttpHeaderAction to the editor
> > > > > > sitemap:
> > > > > > 
> > > > > > <map:act type="set-header">
> > > > > >   <!-- prevent caching in the browser -->
> > > > > >   <map:parameter name="Cache-Control" value="pre-check=0" />
> > > > > >   <map:parameter name="Expires" value="-1" />
> > > > > > </map:act>
> > > > > > 
> > > > > > Maybe you could try something like that.
> > > > > > But I wonder that your publication behaves differently than the default
> > > > > > publication. Does it overwrite the usecase-1formedit.xmap?
> > > > > > 
> > > > > >   Josias
> > > > > > 
> > > > > > > cheers 
> > > > > > > simon
> > > > > 
> > > > > thanks josias
> > > > > 
> > > > > but there is just one usecase-1formedit.xmap so i don't understand the
> > > > > different behavior of those publications. 
> > > > > and i noticed that those fields are actually not specified unless i
> > > > > press the cancel button in the oneFormEditor-page. just after pressing
> > > > > the cancel-button those fields (expired/modified) are set. so i'm a bit
> > > > > lost in confusion :-)
> > > > > 
> > > > > simon
> > > > 
> > > > sorry there is no different behavior between the publications. the
> > > > differnce is just between befor and after pressing cancel.
> > > > simon
> > > 
> > > Hm, I tried to press cancel in the oneFormEditor in the default pub, but
> > > the header of the response did not contain an expired field.
> > > (I'm using firefox and the webdeveloper plugin to see the response
> > > header)
> > > Can you you describe the problem with more detail? What exactly is being
> > > cached?
> > > 
> > >   Josias
> > 
> > the problem just matters in the IE. After pressing cancel once, and
> > going back to the oneFormEditor and change something and save and going
> > back to oneFormEditor it shows me the version as it used to be when i
> > pressed cancel. 
> > but i saw the difference in the firefox. if i open the oneFormEditor and
> > click the right-mouse-button -> view page info -> general tab there are
> > the fields modified/expires not specified. after i press cancel and go
> > back to oneFormEditor again and have a look on the page info the 2
> > fields are now spcified with date/time.
> 
> Indeed, now I can reproduce the problem.
> You could try to insert the set-header action into
> usecase-1formedit.xmap as follows:
> 
>           <map:match pattern="open" type="step">
>             <map:match pattern="*/authoring/**.html">
>               <map:act type="reserved-checkout">
>                 <map:generate type="serverpages"
> src="{global:basedir}/content/rc/{exception}.xsp">
>                   <map:parameter name="user" value="{user}"/>
>                   <map:parameter name="filename" value="{filename}"/>
>                   <map:parameter name="date" value="{date}"/>
>                   <map:parameter name="message" value="{message}"/>
>                 </map:generate>
>                 <map:transform
> src="{global:basedir}/xslt/rc/rco-exception.xsl"/>
>                 <map:call resource="style-cms-page"/>
>               </map:act>
>               
>               <map:generate
> src="{global:basedir}/pubs/{1}/content/authoring/{page-envelope:document-path}"/>
>               <map:transform
> src="{global:basedir}/xslt/authoring/edit/oneform.xsl">
>                 <map:parameter name="docid"
> value="{page-envelope:document-id}"/>
>                 <map:parameter name="language"
> value="{page-envelope:document-language}"/>
>               </map:transform>
>               
>               <map:act type="set-header">
>                 <!-- prevent caching in the browser -->
>                 <map:parameter name="Cache-Control"
> value="pre-check=0" />
>                 <map:parameter name="Expires" value="-1" />
>               </map:act>
>               
>               <map:call resource="style-cms-page"/>
>             </map:match>
>           </map:match>
> 
> 
> Does that help?
> 
> regards,
>   Josias

excellent josias, it really helped. it works now. thanks
simon


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: cache problem/http header fields

Posted by Josias Thoeny <jo...@wyona.com>.
On Mon, 2005-04-11 at 18:00 +0200, simon litwan wrote:
> Am Montag, den 11.04.2005, 17:38 +0200 schrieb Josias Thoeny:
> > On Mon, 2005-04-11 at 16:24 +0200, simon litwan wrote:
> > > > > > i'm facing a problem with a cached page. in the publication i'm working
> > > > > > on are the expires/modified-field (HTTP Header Fields) of the
> > > > > > oneFormEditor set. for all the other pages (as far as i see) in this
> > > > > > publication those fields are not specified.
> > > > > > the IE is using those fields to decide to cache the site or not. 
> > > > > > in the default publication are those filds not specified for the
> > > > > > oneFormEditor-page so the IE does'nt cache it. how does lenya handle the
> > > > > > HTTP Header Fields. 
> > > > > > maybee i'm digging in the wrong corner. any help would be great.
> > > > > > 
> > > > > 
> > > > > I've had a similar problem with Xopus (IE was caching the documents),
> > > > > and was able to solve it by adding the HttpHeaderAction to the editor
> > > > > sitemap:
> > > > > 
> > > > > <map:act type="set-header">
> > > > >   <!-- prevent caching in the browser -->
> > > > >   <map:parameter name="Cache-Control" value="pre-check=0" />
> > > > >   <map:parameter name="Expires" value="-1" />
> > > > > </map:act>
> > > > > 
> > > > > Maybe you could try something like that.
> > > > > But I wonder that your publication behaves differently than the default
> > > > > publication. Does it overwrite the usecase-1formedit.xmap?
> > > > > 
> > > > >   Josias
> > > > > 
> > > > > > cheers 
> > > > > > simon
> > > > 
> > > > thanks josias
> > > > 
> > > > but there is just one usecase-1formedit.xmap so i don't understand the
> > > > different behavior of those publications. 
> > > > and i noticed that those fields are actually not specified unless i
> > > > press the cancel button in the oneFormEditor-page. just after pressing
> > > > the cancel-button those fields (expired/modified) are set. so i'm a bit
> > > > lost in confusion :-)
> > > > 
> > > > simon
> > > 
> > > sorry there is no different behavior between the publications. the
> > > differnce is just between befor and after pressing cancel.
> > > simon
> > 
> > Hm, I tried to press cancel in the oneFormEditor in the default pub, but
> > the header of the response did not contain an expired field.
> > (I'm using firefox and the webdeveloper plugin to see the response
> > header)
> > Can you you describe the problem with more detail? What exactly is being
> > cached?
> > 
> >   Josias
> 
> the problem just matters in the IE. After pressing cancel once, and
> going back to the oneFormEditor and change something and save and going
> back to oneFormEditor it shows me the version as it used to be when i
> pressed cancel. 
> but i saw the difference in the firefox. if i open the oneFormEditor and
> click the right-mouse-button -> view page info -> general tab there are
> the fields modified/expires not specified. after i press cancel and go
> back to oneFormEditor again and have a look on the page info the 2
> fields are now spcified with date/time.

Indeed, now I can reproduce the problem.
You could try to insert the set-header action into
usecase-1formedit.xmap as follows:

          <map:match pattern="open" type="step">
            <map:match pattern="*/authoring/**.html">
              <map:act type="reserved-checkout">
                <map:generate type="serverpages"
src="{global:basedir}/content/rc/{exception}.xsp">
                  <map:parameter name="user" value="{user}"/>
                  <map:parameter name="filename" value="{filename}"/>
                  <map:parameter name="date" value="{date}"/>
                  <map:parameter name="message" value="{message}"/>
                </map:generate>
                <map:transform
src="{global:basedir}/xslt/rc/rco-exception.xsl"/>
                <map:call resource="style-cms-page"/>
              </map:act>
              
              <map:generate
src="{global:basedir}/pubs/{1}/content/authoring/{page-envelope:document-path}"/>
              <map:transform
src="{global:basedir}/xslt/authoring/edit/oneform.xsl">
                <map:parameter name="docid"
value="{page-envelope:document-id}"/>
                <map:parameter name="language"
value="{page-envelope:document-language}"/>
              </map:transform>
              
              <map:act type="set-header">
                <!-- prevent caching in the browser -->
                <map:parameter name="Cache-Control"
value="pre-check=0" />
                <map:parameter name="Expires" value="-1" />
              </map:act>
              
              <map:call resource="style-cms-page"/>
            </map:match>
          </map:match>


Does that help?

regards,
  Josias

> simon
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: cache problem/http header fields

Posted by simon litwan <si...@wyona.com>.
Am Montag, den 11.04.2005, 17:38 +0200 schrieb Josias Thoeny:
> On Mon, 2005-04-11 at 16:24 +0200, simon litwan wrote:
> > > > > i'm facing a problem with a cached page. in the publication i'm working
> > > > > on are the expires/modified-field (HTTP Header Fields) of the
> > > > > oneFormEditor set. for all the other pages (as far as i see) in this
> > > > > publication those fields are not specified.
> > > > > the IE is using those fields to decide to cache the site or not. 
> > > > > in the default publication are those filds not specified for the
> > > > > oneFormEditor-page so the IE does'nt cache it. how does lenya handle the
> > > > > HTTP Header Fields. 
> > > > > maybee i'm digging in the wrong corner. any help would be great.
> > > > > 
> > > > 
> > > > I've had a similar problem with Xopus (IE was caching the documents),
> > > > and was able to solve it by adding the HttpHeaderAction to the editor
> > > > sitemap:
> > > > 
> > > > <map:act type="set-header">
> > > >   <!-- prevent caching in the browser -->
> > > >   <map:parameter name="Cache-Control" value="pre-check=0" />
> > > >   <map:parameter name="Expires" value="-1" />
> > > > </map:act>
> > > > 
> > > > Maybe you could try something like that.
> > > > But I wonder that your publication behaves differently than the default
> > > > publication. Does it overwrite the usecase-1formedit.xmap?
> > > > 
> > > >   Josias
> > > > 
> > > > > cheers 
> > > > > simon
> > > 
> > > thanks josias
> > > 
> > > but there is just one usecase-1formedit.xmap so i don't understand the
> > > different behavior of those publications. 
> > > and i noticed that those fields are actually not specified unless i
> > > press the cancel button in the oneFormEditor-page. just after pressing
> > > the cancel-button those fields (expired/modified) are set. so i'm a bit
> > > lost in confusion :-)
> > > 
> > > simon
> > 
> > sorry there is no different behavior between the publications. the
> > differnce is just between befor and after pressing cancel.
> > simon
> 
> Hm, I tried to press cancel in the oneFormEditor in the default pub, but
> the header of the response did not contain an expired field.
> (I'm using firefox and the webdeveloper plugin to see the response
> header)
> Can you you describe the problem with more detail? What exactly is being
> cached?
> 
>   Josias

the problem just matters in the IE. After pressing cancel once, and
going back to the oneFormEditor and change something and save and going
back to oneFormEditor it shows me the version as it used to be when i
pressed cancel. 
but i saw the difference in the firefox. if i open the oneFormEditor and
click the right-mouse-button -> view page info -> general tab there are
the fields modified/expires not specified. after i press cancel and go
back to oneFormEditor again and have a look on the page info the 2
fields are now spcified with date/time.

simon


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: cache problem/http header fields

Posted by Josias Thoeny <jo...@wyona.com>.
On Mon, 2005-04-11 at 16:24 +0200, simon litwan wrote:
> > > > i'm facing a problem with a cached page. in the publication i'm working
> > > > on are the expires/modified-field (HTTP Header Fields) of the
> > > > oneFormEditor set. for all the other pages (as far as i see) in this
> > > > publication those fields are not specified.
> > > > the IE is using those fields to decide to cache the site or not. 
> > > > in the default publication are those filds not specified for the
> > > > oneFormEditor-page so the IE does'nt cache it. how does lenya handle the
> > > > HTTP Header Fields. 
> > > > maybee i'm digging in the wrong corner. any help would be great.
> > > > 
> > > 
> > > I've had a similar problem with Xopus (IE was caching the documents),
> > > and was able to solve it by adding the HttpHeaderAction to the editor
> > > sitemap:
> > > 
> > > <map:act type="set-header">
> > >   <!-- prevent caching in the browser -->
> > >   <map:parameter name="Cache-Control" value="pre-check=0" />
> > >   <map:parameter name="Expires" value="-1" />
> > > </map:act>
> > > 
> > > Maybe you could try something like that.
> > > But I wonder that your publication behaves differently than the default
> > > publication. Does it overwrite the usecase-1formedit.xmap?
> > > 
> > >   Josias
> > > 
> > > > cheers 
> > > > simon
> > 
> > thanks josias
> > 
> > but there is just one usecase-1formedit.xmap so i don't understand the
> > different behavior of those publications. 
> > and i noticed that those fields are actually not specified unless i
> > press the cancel button in the oneFormEditor-page. just after pressing
> > the cancel-button those fields (expired/modified) are set. so i'm a bit
> > lost in confusion :-)
> > 
> > simon
> 
> sorry there is no different behavior between the publications. the
> differnce is just between befor and after pressing cancel.
> simon

Hm, I tried to press cancel in the oneFormEditor in the default pub, but
the header of the response did not contain an expired field.
(I'm using firefox and the webdeveloper plugin to see the response
header)
Can you you describe the problem with more detail? What exactly is being
cached?

  Josias

> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: cache problem/http header fields

Posted by simon litwan <si...@wyona.com>.
> > > i'm facing a problem with a cached page. in the publication i'm working
> > > on are the expires/modified-field (HTTP Header Fields) of the
> > > oneFormEditor set. for all the other pages (as far as i see) in this
> > > publication those fields are not specified.
> > > the IE is using those fields to decide to cache the site or not. 
> > > in the default publication are those filds not specified for the
> > > oneFormEditor-page so the IE does'nt cache it. how does lenya handle the
> > > HTTP Header Fields. 
> > > maybee i'm digging in the wrong corner. any help would be great.
> > > 
> > 
> > I've had a similar problem with Xopus (IE was caching the documents),
> > and was able to solve it by adding the HttpHeaderAction to the editor
> > sitemap:
> > 
> > <map:act type="set-header">
> >   <!-- prevent caching in the browser -->
> >   <map:parameter name="Cache-Control" value="pre-check=0" />
> >   <map:parameter name="Expires" value="-1" />
> > </map:act>
> > 
> > Maybe you could try something like that.
> > But I wonder that your publication behaves differently than the default
> > publication. Does it overwrite the usecase-1formedit.xmap?
> > 
> >   Josias
> > 
> > > cheers 
> > > simon
> 
> thanks josias
> 
> but there is just one usecase-1formedit.xmap so i don't understand the
> different behavior of those publications. 
> and i noticed that those fields are actually not specified unless i
> press the cancel button in the oneFormEditor-page. just after pressing
> the cancel-button those fields (expired/modified) are set. so i'm a bit
> lost in confusion :-)
> 
> simon

sorry there is no different behavior between the publications. the
differnce is just between befor and after pressing cancel.
simon


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: cache problem/http header fields

Posted by simon litwan <si...@wyona.com>.
> > i'm facing a problem with a cached page. in the publication i'm working
> > on are the expires/modified-field (HTTP Header Fields) of the
> > oneFormEditor set. for all the other pages (as far as i see) in this
> > publication those fields are not specified.
> > the IE is using those fields to decide to cache the site or not. 
> > in the default publication are those filds not specified for the
> > oneFormEditor-page so the IE does'nt cache it. how does lenya handle the
> > HTTP Header Fields. 
> > maybee i'm digging in the wrong corner. any help would be great.
> > 
> 
> I've had a similar problem with Xopus (IE was caching the documents),
> and was able to solve it by adding the HttpHeaderAction to the editor
> sitemap:
> 
> <map:act type="set-header">
>   <!-- prevent caching in the browser -->
>   <map:parameter name="Cache-Control" value="pre-check=0" />
>   <map:parameter name="Expires" value="-1" />
> </map:act>
> 
> Maybe you could try something like that.
> But I wonder that your publication behaves differently than the default
> publication. Does it overwrite the usecase-1formedit.xmap?
> 
>   Josias
> 
> > cheers 
> > simon

thanks josias

but there is just one usecase-1formedit.xmap so i don't understand the
different behavior of those publications. 
and i noticed that those fields are actually not specified unless i
press the cancel button in the oneFormEditor-page. just after pressing
the cancel-button those fields (expired/modified) are set. so i'm a bit
lost in confusion :-)

simon




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: cache problem/http header fields

Posted by Josias Thoeny <jo...@wyona.com>.
On Mon, 2005-04-11 at 14:26 +0200, simon litwan wrote:
> hi list
> 
> i'm facing a problem with a cached page. in the publication i'm working
> on are the expires/modified-field (HTTP Header Fields) of the
> oneFormEditor set. for all the other pages (as far as i see) in this
> publication those fields are not specified.
> the IE is using those fields to decide to cache the site or not. 
> in the default publication are those filds not specified for the
> oneFormEditor-page so the IE does'nt cache it. how does lenya handle the
> HTTP Header Fields. 
> maybee i'm digging in the wrong corner. any help would be great.
> 

I've had a similar problem with Xopus (IE was caching the documents),
and was able to solve it by adding the HttpHeaderAction to the editor
sitemap:

<map:act type="set-header">
  <!-- prevent caching in the browser -->
  <map:parameter name="Cache-Control" value="pre-check=0" />
  <map:parameter name="Expires" value="-1" />
</map:act>

Maybe you could try something like that.
But I wonder that your publication behaves differently than the default
publication. Does it overwrite the usecase-1formedit.xmap?

  Josias

> cheers 
> simon
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org