[Pmwiki-users] Suggestion for the sample-config.php

Richard Canning rcanning
Thu Mar 18 18:00:52 CST 2004


I remember a WikiCache cookbook script for v0.5.x

When I finally got it working, it was great, and I am missing in in 0.6.x. I have tried the script, and it broke my site. The whole setting up of a cache directory and then having already compiled pages stored there unless they have been modified is fantastic, and I am hoping that it will become an
option in the standard distribution at some time; or at least that it is done as a working script for 0.6

I know this is off topic, but I had to but in.

Richard Canning

-----Original Message-----
From: Patrick R. Michaud [mailto:pmichaud at pobox.com] 
Sent: Friday, March 19, 2004 11:47 AM
To: David Jackson
Cc: Pmwiki-users at pmichaud.com
Subject: Re: [Pmwiki-users] Suggestion for the sample-config.php


On Thu, Mar 18, 2004 at 11:07:48PM +0000, David Jackson wrote:
> 
> Patrick R. Michaud wrote:
> 
> [..]
> 
> >>Can I suggest that this info is put (commented) into the
> >>sample-config.php?
> >>Or perhaps get a mention in the initial tasks page?
> >
> >
> >How about if I just add it to the standard default configuration, 
> >with an option to set $EnableCompressedOutput=0 for those who don't 
> >want it?
> 
> Sounds good to me.  This is such a good tip, it should be standard.

In general I agree.  OTOH, there are a couple of caveats--

1.  It increases page "latency" -- i.e., the time between
when a user requests a page until they begin to see some text in their browser.  This is because ob_gzhandler waits until the entire page has been generated before it begins to send (compressed) output back to the browser.  This probably won't matter much for small pages, but it may make a
difference in very large pages.

2.  There's a small(?) potential for conflicts with other cookbook scripts. Any scripts that make use of the ob_start(), ob_get_contents(), and ob_end() functions might not work properly if ob_gzhandler is set.

The php.net site says that the preferred mechanism for producing compressed output is to use the ini.zlib.compressed_output configuration directive, which alleviates the latency issue (compressed output is generated "on the fly").  Unfortunately, it doesn't appear to be possible to enable this
directive from within a PHP script--it has to be done from a PHP configuration file or a .htaccess file.

> >Also, I'm currently experimenting with getting PmWiki to honor the 
> >"If-Modified-Since" request header [...]
> 
> I'll take your word on that.  404 is the only response I'm familiar 
> with...

If the browser has a copy of a page in its cache, it's allowed to send an "If-Modified-Since" header in its request.  The server can then either return a copy of the page (as normal), or if it knows that the page hasn't changed it can send back "304 Not Modified" to tell the browser to use its
cached version.  In this case the size of the transferred page 
content is zero--a huge win for bandwidth and speed.  :-)

> >Basically I'm looking to see if any browser caches get out of sync 
> >with the true page contents after someone edits a page.
> 
> Heh.  How would we know ;-)

Well, if a page is edited in the Development group and you see the old version (i.e., you have to hit reload to get the updated version), then it's not working properly.  I guess I'll probably have to enable the feature for the whole pmichaud.com site and see if anyone notices anything. Currently I
have it designed as a cookbook module that is likely to be integrated into the default PmWiki configuration in an upcoming release...

Pm

-- 
Pmwiki-users mailing list
Pmwiki-users at pmichaud.com http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com



The information contained in this email message and any attachments
may be confidential and may also be the subject of legal professional
privilege.  If you are not the intended recipient of this email, any
disclosure or copying of this material is unauthorised and prohibited.
Please notify me by return email.




More information about the pmwiki-users mailing list