February 17, 2013 2:02 pm

PHP Server and Browser Cache

I am writing this tutorial to increase speed of your web applications with server and browser cache. With caching your application become super lets come to the details of the procedure of cache.

Cache

Basics

You should have writing permission for the caching folder (eg. chmod 666 or 777).
You should add attached value (for example cookie or session value ) for the logged users.
The caching object should be added right after the initialization of cookie session.

Sample

1. Server Side Caching

2. Client Side (Browser) Caching

3. Both (Server and Client) Side Caching

4. Logged User Both Side Cache

cache.php file default settings

Cache type table

Type Action
0 No cache
1 Server side cache
2 Client side cache
3 Both sides cache

Author Huzoor Bux

I am Huzoor Bux from Karachi (Pakistan). I have been working as a PHP Developer from last 5+ years, and its my passion to learn new things and implement them as a practice. Basically I am a PHP developer but now days exploring more in HTML5, CSS and jQuery libraries.


Tutorial Categories:
  • sempi

    memcached?

  • Saddam Khan

    Thanks…. Was looking for it

  • Loganatan

    Good, useful.