Results 1 to 10 of 10
Thread: Implement Caching?
-
05-28-2011, 10:30 PM #1Web Hosting Master
- Join Date
- Aug 2010
- Posts
- 1,976
Implement Caching?
Is web caching still needed/necessary since web browsers are already implementing caching by default to increase speed and performance of websites?
I am thinking of implementing web caching but i notice Google Chrome is taking the lead by already having caching enabled. So is caching still needed by web developers/webmasters?Superb Houston/Los Angeles Colocation: LAYERHOST.COM https://www.layerhost.com/colocation
*not affiliated, just recommendation*
-
05-28-2011, 10:35 PM #2Web Hosting Guru
- Join Date
- May 2011
- Location
- Columbus, Ohio
- Posts
- 270
If it is a database heavy site with any decent amount of traffic, yes.
Really depends on the type of site. A browser caching a page does good for that one user, but server caching of data will cache the page for ALL visitors making the same request.
-Greg
-
05-28-2011, 10:36 PM #3Web Hosting Master
- Join Date
- Feb 2011
- Posts
- 792
I think you are talking about two different types of caching. One is on server caching (page caching/database caching/object caching) and that is necessary for good performance. The other is browser caching, which is also necessary for good performance. Use them both, if you can. Is that what you were talking about?
My personal blog -- rubiverse.net
-
05-28-2011, 11:10 PM #4Web Hosting Master
- Join Date
- Aug 2010
- Posts
- 1,976
Superb Houston/Los Angeles Colocation: LAYERHOST.COM https://www.layerhost.com/colocation
*not affiliated, just recommendation*
-
05-28-2011, 11:19 PM #5Web Hosting Guru
- Join Date
- May 2011
- Location
- Columbus, Ohio
- Posts
- 270
Just about every browser has caching on by default installation for at least the past 15 years I have been browsing the internet. So unless you have headers set to tell the browsers differently, the browsers will most likely cache your pages.
-Greg
-
05-29-2011, 01:27 AM #6Web Hosting Master
- Join Date
- May 2008
- Posts
- 858
Yes, every browser has, but by default the cache size is pretty small, at around 64-94 MB, which can be reached in a couple of days just browsing facebook and other crappy sites with lots of "funny" pictures.
So a users' browser will more or less re-request stuff it already cached a few days ago whether you want it or not, it's not really in your control.
What you can do is improve the access times of your website by caching objects and stuff in memory on your server so when users request stuff, they get it fast. Don't count on users' side caching.
-
05-29-2011, 03:28 AM #7Web Hosting Master
- Join Date
- Aug 2010
- Posts
- 1,976
I see.
Also i hear caching is only good for high traffic websites. Why can't one use caching for even small traffic websites if infact the caching only makes the website perform better and faster?Superb Houston/Los Angeles Colocation: LAYERHOST.COM https://www.layerhost.com/colocation
*not affiliated, just recommendation*
-
05-29-2011, 03:51 AM #8Web Hosting Master
- Join Date
- Nov 2010
- Location
- /home/kristoffer
- Posts
- 3,251
██ Serverfruit - awesome cPanel hosting!
██ Bacon forever!
-
05-29-2011, 03:54 AM #9Web Hosting Guru
- Join Date
- May 2011
- Location
- Columbus, Ohio
- Posts
- 270
I just checked the size of cache in firefox, on my system it is "auto set" to 1gig (surprised me!)
IE 8 was still only 50Megs
Couldn't find it in Chrome.
Back to the server caching, again, it depends on how a site is set up and configured for if it is worth it on small site. (ie. if the site is almost just all .html files, what are you really caching?) If the caching system has a low threshold for when to clear out the cache, and it is a site that only gets a few hits per week, it may be writing the cache file each call (as well as loading up as if uncached).
To help give you better advice, maybe you can let us know what method of caching on the server you were thinking about. There are mods for apache that will do it, some 3rd party apps have their own, smarty templates will do it, and then there is custom writing your own.
-Greg
-
05-29-2011, 04:13 AM #10Web Hosting Master
- Join Date
- Aug 2003
- Posts
- 599
The browser cache is at your control. You set the the options with the response headers you return to the client.
Code:Useful Cache-Control response headers include: max-age=[seconds] specifies the maximum amount of time that an representation will be considered fresh. Similar to Expires, this directive is relative to the time of the request, rather than absolute. [seconds] is the number of seconds from the time of the request you wish the representation to be fresh for. s-maxage=[seconds] similar to max-age, except that it only applies to shared (e.g., proxy) caches. public marks authenticated responses as cacheable; normally, if HTTP authentication is required, responses are automatically private. private allows caches that are specific to one user (e.g., in a browser) to store the response; shared caches (e.g., in a proxy) may not. no-cache forces caches to submit the request to the origin server for validation before releasing a cached copy, every time. This is useful to assure that authentication is respected (in combination with public), or to maintain rigid freshness, without sacrificing all of the benefits of caching. no-store instructs caches not to keep a copy of the representation under any conditions. must-revalidate tells caches that they must obey any freshness information you give them about a representation. HTTP allows caches to serve stale representations under special conditions; by specifying this header, youre telling the cache that you want it to strictly follow your rules. proxy-revalidate similar to must-revalidate, except that it only applies to proxy caches.
Similar Threads
-
Best way to implement a webform right now?
By anthonyjknight in forum Web Design and ContentReplies: 10Last Post: 05-12-2010, 02:58 PM -
How to implement a NDA
By whfsk in forum Running a Web Hosting BusinessReplies: 3Last Post: 12-11-2009, 03:10 PM -
Implement SSL_CLIENT_VERIFY
By RS Shamil in forum Hosting Security and TechnologyReplies: 0Last Post: 08-17-2009, 10:37 AM -
Can we do/implement this ?
By Mikey this way! in forum Web HostingReplies: 5Last Post: 09-04-2005, 05:31 AM -
Do you use propay? How did YOU implement it?
By Ceromus in forum Running a Web Hosting BusinessReplies: 3Last Post: 09-30-2003, 01:11 AM