DS HomeDev Shed | ASP Free | Dev Articles | Scripts | Dev Hardware | Dev Archives | SEO Chat | Dev Mechanic | Web Hosting
      PHP
Home arrow PHP arrow Using HTTP Compression in PHP: Make Your Web Pages Load Faster
 
 
  Administration  
  Apache  
  BrainDump  
  Flash  
  Java  
  JavaScript  
  Multimedia  
  MySQL  
  Oracle  
  Perl  
  PHP  
  Practices  
  Python  
  Reviews  
  Security  
  Style-Sheets  
  Web Services  
  XML  
  Zend  
  Zope  
 Developer Forums  
 Forums Sitemap 
 Web Hosting 
 Dedicated Servers 
 Developer Updates  
 Free Website Content 
 Weekly Newsletter
 
 Articles:  
 Blogs:  
 Forums:  
 Write For Us Get Paid 
 Request Media Kit
 Contact Us 
 Site Map 
 Add Mozilla Sidebar 
 Bookmark this site 
 WAP for Mobiles 
 Klip for KlipFolio 
 Privacy Policy 
 Support 

PHP


Using HTTP Compression in PHP: Make Your Web Pages Load Faster
Contributed by Alejandro Gervasio
Article Rating:starstarstarstarstar / 3
2006-04-10
Poor Best
[ Send Me Similar Content When Posted ]
 
[ Add Developer Shed Headlines To Your Site ]

Discuss This Article
DISCUSS
Developer Newsletter
NEWS
E-mail This Article
SEND
Print This Article
PRINT
PDF Version
PDF
 

Article Index:

  1. Using HTTP Compression in PHP: Make Your Web Pages Load Faster
  2. The basics of data compression: writing a simple "crunching" PHP script
  3. Moving one step forward: using real HTTP compression on parsed PHP files
  4. Compressing data by "Gzip:" defining the "getCompressedContent()" function
  5. Search For More Articles!
  6. Author Terms
 
 
Using HTTP Compression in PHP: Make Your Web Pages Load Faster
(Page 1 of 4 )

Web developers are always looking for ways to reduce the loading time of their pages. This article, the first of three parts, shows you how to make PHP pages load faster by showing you how to compress dynamic PHP pages. Techniques covered include using PHP's built-in �gzencode()� function, along with output buffering control functions.

Introduction

Due to its inherent versatility, PHP provides developers with the ability to develop different mechanisms for reducing the loading time of parsed PHP pages. When it comes to optimizing methods for making PHP pages load faster, I covered the topic across several articles, which have been previously published right here, on the prestigious Developer Shed network, ranging from how to develop an (X)HTML caching system, to implementing a MySQL result set caching mechanism.

Of course, reducing the load time of parsed PHP pages isn't limited to developing caching systems of a different nature. There are many other techniques that can be used, either as standalone or integrated solutions, in order to tackle some performance issues and deliver quickly dynamic content.

Admittedly, making web pages (static or dynamic ones) load quicker is actually a fine-tuning process, which involves not only using the caching methods that I mentioned before, but implementing other well-known approaches. These include optimizing CSS, JavaScript and Flash files, compressing images, and eventually the optimization of additional elements that might be requested together with a web document, like Java applets.

While the previous optimization methods are used frequently during the development of a Web application, in order to reduce the amount of data transmitted across different HTTP requests, in general terms caching systems are aimed at decreasing the frequency that data is sent through a specific network (local networks, intranets, extranets or the Internet as a whole). However, are these techniques the only ones used to optimize web pages? Fortunately, the answer is a resounding No!

Just in case you weren't aware of it, a few years ago most modern browsers began to support HTTP compression as a transparent layer. This can be extremely useful when looking for additional ways to reduce the amount of data transmitted between a Web server and a client. As a result, this technique also can be taken into account if you want to make your PHP pages load considerably faster.

Since PHP offers a powerful built-in library for handling HTTP compressed data, over this series I'll explain the basics of working with HTTP-compressed PHP pages. I'll illustrate, with several code samples, different methods for compressing dynamic PHP pages. So, do you want to learn how to take advantage of HTTP compression in your own PHP applications? Right, start reading to find out how this is done!


 
 
>>> More PHP Articles
 

   

Scripts.com
Dev Shed - The Open Source Web Development Site Dev Shed
Get This For Your Site!
 
» Reading Text Files using Oracle PL/SQL and UTL_FILE in: Oracle
 
» Using HTTP Compression in PHP: Make Your Web Pages Load Faster in: PHP
 
» Optimizing Queries with Operators, Branching and Functions, continued in: MySQL
 
VeriSign SSL certificate
ASP Free - Your Source For ASP Source Code and More... ASP Free
Get This For Your Site!
 
» Working with T-SQL Stored Procedures using ADO.NET in: MS SQL Server
 
» The Beauty of ASP.NET 2.0 Themes in Visual Studio 2005 in: ASP.NET
 
» Interacting with Databases in: ASP.NET
 
Free Product Reviews
Dev Articles - Your Multi-Platform Development Source Dev Articles
Get This For Your Site!
 
» How to Use JavaScript to Find Hardware Information in: JavaScript
 
» How to Access a SQL Anywhere Database with ColdFusion in: ColdFusion
 
» Basic configuration of osCommerce, concluded in: Web Authoring
 
Website Hosting
Dev Hardware - Your Home for Hardware Resources Dev Hardware
Get This For Your Site!
 
» Nintendo: Ready to Start a Revolution in: Opinions
 
» Silentmaxx Fanless 400W PSU Review in: Power Supply Units
 
» XG Viper 2 Case Review in: Computer Cases
 
128-bit SSL Certificates
SEO Chat - Search Engine Optimization SEO Chat
Get This For Your Site!
 
» AOL Plays to Growing Mobility in: Search Engine News
 
» What`s up with Ugly Websites? in: Website Marketing
 
» Google Sitemaps Review in: Google Optimization
 
Advertise With Us
Dev Mechanic - Webmaster Tools, Developer Tools, Programming Tools Dev Mechanic
Get This For Your Site!
 
» Can a Home Internet Business Really Make Upwards Of 50,000 A Month? in: Online Business Help
 
» How To Start A Home Based Business? in: How To
 
» Will You Be an Internet Success Story in: Online Business Help
 
Dedicated Servers
Web Hosters - Find Webhosting Now! Web Hosters
Get This For Your Site!
 
» Choosing a Web Host if You`re a Reseller in: Web Hosting Articles
 
» Advertising Ideas for Your Web Hosting Business in: Web Hosting Articles
 
» Planning Your Web Hosting Business, continued in: Web Hosting Articles
 
Write For Us
Developer Shed Blog - Technical Professionals Discuss Todays Topics... Dev Blog
Get This For Your Site!
 
» Local cell, Web role link London and Madrid probes - Discuss
 
» Bush Calls on China to Address Currency - Discuss
 
» Nokia Q1 phone prices beat forecasts, stock jumps - Discuss
 
VeriSign SSL encryption
 
Dev Shed Forums | ASP Free Forums | Dev Articles Forums | Dev Hardware Forums | SEO Chat Forums | Dev Archives Forums
 
 
© 2001-2006. All rights reserved. Dev Shed Cluster 1 hosted by Hostway