Training, Open Source computer languages

PerlPHPPythonMySQLhttpd / TomcatTclRubyJavaC and C++LinuxCSS

Search our site for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
Compressing web pages sent out from server. Is it worth it?
Web servers can compress .html and similar files before they send them out - a great way to keep traffic volume down where bandwidth is more of a consideration than processor power. But what proportion of browsers can accept compressed data? That's a darned good question which I was asked on today's Tomcat Deployment course.

Adding in a few lines on the end of a PHP script that encapsulates all our web pages, I kep a log file for a short while. And out of a sample of 1380 hits on our web site ...
1035 (75%) could accept gzip compression
822 (60%) could accept deflate compression
166 (12%) could accept x-gzip compression
Only 245 requests (18%) did not include any notice that they could receive compressed responses.

Here's the PHP code I used ...

$fho = fopen("$_SERVER[DOCUMENT_ROOT]/../compress.dat","a");
fputs($fho,"$_SERVER[HTTP_ACCEPT_ENCODING]\n");
fclose($fho);


Remember that images are already compressed (part of the format of a.jpg, for example), so there's little point in trying to have the server compress them ... but for a busy, bandwidth limited setup at server and/or browser, I conclude that compression IS worthwhile.
(written 2007-09-14 16:57:26)

 
Associated topics are indexed under
A211 - Web Application Design and Deployment
A603 - Web Application Deployment - Further httpd Configuration
A654 - Web Application Deployment - Configuring and Controlling Tomcat

Back to
FSB (Federation of Small Businesses) Western Region
Previous and next
or
Horse's mouth home
Forward to
Actionscript / Flash / Flex (IAQ/FAQ)

Some other Articles
.php or .html extension? Morally Static Pages
Match the Bedroom to the Hotel
Mood shots
Actionscript / Flash / Flex (IAQ/FAQ)
Compressing web pages sent out from server. Is it worth it?
FSB (Federation of Small Businesses) Western Region
Cash is not an acceptable way of paying
Screw it or Glue it? Access to Object variables - a warning
Wireless Internet Access at hotels - an update and some pitfalls
Evening, Devizes and Sells Green
1638 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

© WELL HOUSE CONSULTANTS LTD., 2008: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho