Website status feature [core] (on-line, minimal, error, off-line, etc.)

IMPORTANT NOTE

The Website Status represents the current status (main behavior) of the website. This is quite different from the Status Report feature [core] which attempts to help the user with things he still has to do on his website.

Statuses

The following are the different statuses that a website can enter depending on various signals such as wether the person just sent us spam or whether the owner of the site changed the current status.

  • On-line -- this is the standard state, everything shows up as expected
  • Minimal -- the site works, but any form is marked as read-only or is not shown/accessible
  • Debug -- the debug mode is used to search for problem
  • Off-line -- the owner decided to put the site off-line
  • Error -- some error was detected and plug-ins should do minimal work from now on to get the error back to the user and be done with it (i.e. /spam/denied type of a path would make the system reply with a minimal amount of work.)

 

On-line

This is the standard state. Everything works as expected. You see all the content as permitted.

Minimal

The Minimal state is very similar to the On-line state except that only the minimum is presented. This means all forms are removed (except for the log-in form and administrative forms since it would otherwise prevent the administrator from going back to the On-line state.)

Debug

The Debug state is used by programmers to check the site and try to find problems with the code. It should not be used with production systems (especially not a production system that receives continuous hits since the Debug version is slow.)

Note that this status is an extra flag so all the other statuses can be made debug (i.e. On-line Debug, Minimal Debug, Off-line Debug, Error Debug.)

Off-line

It can be useful to mark a website as off-line as you want to do some maintenance while hidden.

The Off-line status would mainly be for safe maintenance, although with a system like Cassandra that should not really be necessary (since maintenance should be done from a backend Cassandra node.) There could be times when it would be useful (i.e. website under attack.)

There are a few things to think about for this feature:

1. When the user changes the status (on to off, or off to on), make sure to request the user to confirm that's really what one wants to do

2. To make statuses work properly the entire cache system must know of the current status (i.e. if we do implement a cache in the Apache server, then it would be to test a file, if there, we know that this site is in a status other than On-line and it should not use the cache,) and when we come back on-line from off-line, decide whether the old cache is worth keeping...

3. The Off-Line message must include a 503 error or something similar to make sure that the user doesn't get a 304 when clicking Reload. (although it looked like I was getting that with another site...)

Error

When an error occurs, we may certainly want to display a minimal result (i.e. a very simple HTML without any CSS, no JavaScript, etc.) to minimize the large amount of resources that the system would otherwise take to give the error.

Errors are those errors that we detect as being from robots, hackers, etc. Regular users should still get the usual error pages.

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly