 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Gonzalo Ayuso's Blog: Speed up page page load combining javascript files with PHP
by Chris Cornutt February 21, 2011 @ 13:01:54
Gonzalo Ayuso has a handy performance tip for getting that little bit extra speed from your page load times - combining Javascript with PHP files.
One of the golden rules when we want a high performance web site is minimize the HTTP requests. Normally we have several JavaScript files within our projects. It's a very good practice to combine all our JavaScript files into an only one file. [...] But if your project is alive and you are changing it, it's helpful to spare your JavaScript files between several files. [...] So we need to choose between high performance and development comfort.
He includes a quick script that runs through your javascript directory (recursively), grabs all of the javascript content from each, combines and minifies them to serve gzip compressed out to the browser.
voice your opinion now!
javascript tutorial combine minify gzip page load performance
Stuart Herbert's Blog: More about Performance Tuning
by Chris Cornutt February 05, 2008 @ 07:57:00
Based off of a previous article from Mike Willbanks, Stuart Herbert has posted some of his own thoughts on tuning and tweaking your applications for the best performance you can get out of them.
There's some good advice in there, and I thought it'd be a good idea to quickly add a bit more detail about the separate approaches that Mike raises.
He goes over the APC caching, memcache, the "gzip trick", the "Not Modified" header and optimized SQL statements.
He also mentions one thing that Mike didn't mention - a split between static files (no PHP needed) and their dynamic cousins. Having a more pure Apache (no PHP installed) can help give a minute jump in speed that, depending on the size of the site, could really add up from a user's perspective.
voice your opinion now!
performance tune memcache apc sql optimize gzip notmodified
DevShed: An Object-based Approach to HTTP Compression in PHP
by Chris Cornutt April 17, 2006 @ 13:06:46
DevShed has posted part two of their series on speeding up your page load times with HTTP compression, this time looking at a more object-oriented approach to handling the data you want to compress.
Over the first tutorial of this series, I developed some hands-on examples, aimed at illustrating how "Gzip" encoding can be used within PHP scripts to compress the output generated by dynamic PHP pages. After transferring the encoded data to the client, contents are uncompressed and finally displayed on the browser.
By the end of this article, you should have the appropriate knowledge for building a simple data compressor class, in addition to using HTTP compression for reducing the download time of object-generated web pages.
They start with the creation of a simple data compression class, with functions to see if the browser supports gzip encoding and to get/send/compress the actual data. With the sample class created, they put it to the test with a more real-world example - echoing out user information from a MySQL database.
voice your opinion now!
gzip compression buffer output object-oriented gzip compression buffer output object-oriented
PHPit.net: Having fun with PHP's output buffer
by Chris Cornutt April 17, 2006 @ 07:13:24
One of the more powerful and handy features that PHP offers is output buffering. It allows you more control over when the client's browser gets the information instead of just spewing information at random. It is a little tricky to get the hang of, so PHPit.net has put together this new tutorial on how to get started.
I'm sure most of us have come across the dreaded "Cannot modify header information - headers already sent", and this is usually caused when your script tries to send a header or set a cookie, when it's already sent output. The easiest fix is to make sure no output has been sent, but it's also possible to enable something called output buffering which also solves the problem.
In this article I'll first show you how output buffering works, and take you through most of its basic functions. After that we'll have a look at what's possible with output buffering, and show you some neat tricks.
The groundwork is laid first, giving a simple "Hello world" example to show how the code flows. They show how the buffering system works and how to use a callback function to modify the contents of the buffer before outputting (including a full replace function to text within the buffer from an array). They follow that with a look at creating your own HTML tags and using the gzip compression functionality to speed up your pages.
voice your opinion now!
output buffering example tutorial simple callback replace gzip output buffering example tutorial simple callback replace gzip
|
Community Events
Don't see your event here? Let us know!
|