Tips on Web Page Caching

0
Your rating: None

■ Note that caching is, in theory, a very good thing, designed to minimize unnecessary server requests. If properly controlled, caches are great for both the server and the client.

■ If you have cURL installed on your system, you can run this command to see a
page’s headers:
curl --head http://www.example.com/page.php

■ If your applications make use of sessions, you can adjust session caching with the session_cache_limit() function. See the manual for more information.

■ Page caching can also be affected using the META tags, placed within an HTML
document’s head. This may not work as reliably with some browsers as the
header() method.

■ Client/server performance can also be improved—for large scripts—using Zlib
output compression or the function ob_gzhandler() . See the PHP manual
for more on both.

Server-Side Caching

There is an alternative type of caching you can use to affect the client/server
relationship. When a PHP script is requested, the Web server asks the PHP
module to read and process that code.

Server-side caches store preprocessed versions of a script, so that they may be
served without processing. Server-side caching can greatly improve your application’s performance but normally requires more control over the server than the average user has (read: those using a shared hosting service).

If you want to look into and possibly implement server-side caching, there are
many options. APC (Alternative PHP Cache) is very popular, so much so that
it’s now part of PECL (http://pecl.php.net). It’s free, but installation can be tricky.

Zend (www.zend.com) offers the free Zend Optimizer. It’s fairly easy to install, but you must remember to upgrade it when you upgrade PHP (it’s version-specific).

For options that do not require software installation on a server, there are the PEAR Cache and Cache_Lite packages. It’s also possible to write your own caching system, although that’s probably not the most efficient idea.

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.

Cumulus Tag Cloud

Kiran Says

SEO Architect,SEO Specialist reflect my values.

By enduring black hat methods the SEO industry is setting itself up for washout and sleepwalking into oblivion.

Jobs in India