Content Management System (CMS) works in a very different manner than that of a normal HTML website. On a static website, all the pages are written in HTML by someone who knows HTML & designing. All such static HTML pages need to be uploaded to the server.
Using a server-side application, pages can be produced dynamic pages in run-time
A normal HTML website’s operation is completely different from the way a CMS works. On a standard site, all the pages exist on the server. However, with a server-side web application such as a CMS, pages are built on the fly; they do not exist before a browser requests one. The sequence might go as follows:
- The visitor’s browser requests a page from the server.
- The server (often Apache) looks in its cache to see if that page is in memory, having been previously served within a set time period. If yes, it supplies the page and its associated files.
- If not, the server requests the page from the CMS.
- The CMS looks in its own cache, if it has one, and if it locates the page pre-built, it then supplies it.
- If not, it builds the page: it gets the publishing parameters and the text from the database, then graphics, images and other components from the relevant folders, builds the page, and passes it to the server app.
- The server passes the page along to the browser. It also carries out a multitude of other tasks simultaneously: it queries the top-level htaccess file, queries the local htaccess file for all sorts of options and variables, serves the page’s associated scripts such as CSS and JS scripts, executes any scripting, hands out one or more cookies, hands out the favicon, logs all the traffic involved with that page request, logs any errors; and all in 0.25 of a second – hopefully.
This sounds a bit involved but normally takes little time even for the longest process (provided that all parameters are optimal, which they hardly ever are). In reality there are some drawbacks.