Powered by MediaWiki
Personal tools

Transport optimizer plugin

From B2evolution

Jump to: navigation, search

The Transport optimizer plugin helps you saving bandwidth.

It supports ETag headers and GZip compression.

Contents

[edit] ETag headers

With every generated page, a hash value of the content gets send to the browser. If a browser then requests the same URL again, it may send this hash value again. If it has not changed since then, we can send a "304 Not Modified" response, without transferring the content again.

NOTE: this does not save processing of the page - it still gets generated.

[edit] GZip compression

If enabled and the browser supports it, the generated page content gets compressed.

This saves bandwidth, but needs more processing power on the server.

NOTE: it's better to let the webserver handle compression, e.g. through Apache's mod_gzip.

[edit] General note

For all these features, we need PHP output buffering, which will prevent from sending the output progressively to the webserver.

If a long page takes 2 seconds to be generated completely on a loaded server, the top of the page will only be sent after those 2 seconds, and the user won't see anything during at least 2 seconds (generation + transmission time). Without output buffering, the output will be sent progressively starting at 0 seconds (given that there's nearly no initialisation on a page) and the user will start seeing something earlier (0 + transmission time).

[edit] Location

The Transport optimizer plugin gets shipped with b2evolution and can be found in /blogs/plugins/_transport_optimizer.plugin.php.