The first thing to know is that server-side caching is different from your browser cache. When you visit a website, some of the resources for that website will most likely be cached in your browser (Chrome, Safari, Firefox, etc) to make the web page load faster the next time you come back. This is not the type of cache we are talking about but it works the same way. It’s just stored on the hosting server instead of being stored in your browser.
When you click a link or type in a web address, a request for the content and resources of that page is sent to a hosting server. When you are using a content management system (CMS) like WordPress, the server has to process code in order to communicate with the database where the content is stored. Think of it like an Excel spreadsheet. If I want to know what is in cell D4 I have to use my computer (the server in this analogy) to open Excel (the server-side program) and then use that program to open a spreadsheet (the database) before I can find the contents of cell D4. Hosting servers do the same thing. In fact, the content you are reading right now is stored in a database on this website. When you came to this page, a hosting server had to retrieve information from the appropriate cell to be displayed here for you to see inside of the design of the website.
Like any computer, a hosting server will slow down when you have too many processes running for it to keep up. After all, a hosting server is just a computer in a warehouse somewhere that has only 1 job to send your website back to any browser that requests it. When you have a lot of requests coming in (i.e. lots of website visitors), the process of compiling pages through requesting content from different cells in the database can begin to put a strain on the server. At a certain point the server will start to slow down, your website will take longer to load, and if there’s too much strain the server will shut off and your website will go down.
Caching takes the web page and stores a “snapshot” of it in on the hosting server. The next time someone tries to load that same web page it can load the cached version rather than sending it through the process of compiling a fresh page. This helps to eliminate the strain on the server when you have a lot of website visitors.
Yes and no. The more caching you apply to a website, the less dynamic you can be with the content. This is where we get into the types of server-side cache. There’s page cache and object cache.
To put it plainly, you will be better off focusing your energy on page cache if your website does not serve up much dynamic content. For example, a website for a local small business will rarely have content change; perhaps a blog post from time-to-time and some of the text on variuos pages when needed. On the other hand, you have e-commerce websites where the cart needs to show different things to different users. If you completely cache the cart page on an e-commerce website then the first person to visit that page will see the items they added to their cart, and so will everyone else. To be clear with this scenario, every other person that goes to the cart will see whatever the first person added to their cart. For that reason you cannot simply apply page cache across the board for every website.
A content delivery network (CDN) is a group of specialized hosting servers that are scattered in different geographical areas. These servers do not generally handle data processing like a normal server, so their primary purpose is to store static, cached content and resources. For example, websites normally have a stylesheet that is referenced to make the web page look the way it does. That stylesheet does not change from one web page to another on the same website, so it is what we consider a static resource. The same thing applies to photos, icons, etc. These types of things don’t need to change so they can be cached more agressively.
The added benefit of a CDN is that your static content can load froma physical location that is closer to the website user. If your primary hosting server is in Milwaukee, it will take longer for data to transmit to places like New York, Los Angeles, Seatle, and Miami. When you incorporate a CDN, it distributes your static files to these specialized servers all over the the place and further lessens the strain on your main server.
I thought you’d never ask. Aside from the benefits to users that are not in your area (which you may not care about), the one big reason you want to use a CDN is that Google likes you more when you do. Google is always looking to give the best possible user experience and they give bonus points in the search rankings to websites that do the same thing. Having a fast website that’s encrypted and mobile friendly is pretty much a must these days if you want to get better rankings.
Information contained on this page is provided by an independent third-party content provider. Frankly and this Site make no warranties or representations in connection therewith. If you are affiliated with this page and would like it removed please contact email@example.com