2

I am building a site with lots of images, i want all the images to be cached if loaded once in a browser for ever, I use php for my sites, for example, if you load facebook for the first time, you would find it a little bit slower to load but after second time, facebook will load extremely fast. If you view a picture, it will get cached into your browser and if you view the same picture, it will not load from server, instead it will load from cache and it will load very fast and no need to load the image again. I also want to cache the some of css and javascript files too, Thanks in advance

2 Answers2

3

Caching assets like images is not dependent on PHP.

Review the answers here: How to cache scripts and images from my site?

Community
  • 1
  • 1
sikander
  • 2,286
  • 16
  • 23
0

If you load image/css/JavaScript files (and not through a php script) and you set your server settings right (default will do probably) than this is already done in advance.

Rene Pot
  • 24,681
  • 7
  • 68
  • 92