Structure, scripting
Javascript
For the first year Javascript was used to expand the left-index. Javascript was scrapped for 4 reasons:
- not everyone has JS, or not every user accesses a computer that has JS switched on
- sizes of index file, having JS expanding index, are very large, and unnecessary for those with limited field of interest.
- the left-index cannot list the hierarchy down to any one book, and then include all the chapters in that book.
- the current system Home >> Core >> Subject >> Subject index opened in window opens cleanly and simply, with all chapters listed with only 3 clicks.
- KISS
PHP
For 2 years I used PHP to minimize file sizes and repetition by calling the html head, etc. But then I scrubbed this because, while it slowed delivery by requiring the server to reconstruct every file, it did not save space because a hard-disk allots disk space in multiples of 16KB. A file of less than 15KB or 31KB can carry its own head without occupying more disk space.
Hierarchical structure
Hierarchical structure is the method of organizing your website as folders within folders within folders. Which demands that your server go down, down, down looking for the chapter, then up, up, up looking for the stylesheet, than down, down, down looking for the images that go into the chapter, then up, up, up, ... you get the idea. And searching takes time. Serious delay.
Hierarchies are good for easing the search tasks of the webmaster, which is important when constructing the website, but when the work is done and only occasional maintainence is required, the webmaster does not need such help.
But the server does. Demands on servers are always increasing as more users take advantage of a good website, so, to accommodate this, the server-side demands should be lessened wherever possible. Thus out went PHP and out went my magnificent hierarchy. The resulting drop in user's download time was significant.
Remember your knowledge of how servers search because too flat a structure and poor file-naming can increase the time spent searching.
File-naming
Poor file-naming can increase the time the server spends searching, so the files are named such that, within any subject, the first 2 characters identify both the book and the chapter. The first character distinguishes the book and the second character the chapter.
Example: Bb_gautama_KZR.htm
B = Buddhism
b = second chapter
gautama = name for webmaster's benefit
K = Core
Z = Z is used to group all the society subjects: social, economic, political, religion. (S is used to group Science subjects.)
R = Religion.
If a file is accidentally dropped when moving with the laptop's fingerpad, it can be found by searching with "*_KZR.htm". If a name like Ep_entering_KZR.htm is found in Physics, we recognize immediately that it does not belong there because we know KZR = Core's Religion. A quick check for "E" shows it belongs in the folder for Islam.
Indexes
So far, I have limited the number of indexes to:
All the remaining sections, on clicking their names in the left-index, open their contents-page in the main window. This is unbelievably simpler, cleaner and faster than the earlier methods chosen.
Frames
The frames are set up in a 3 x 3 pattern.
Going across, the first column is f1, the second is f2.
Going down the first is f1, and the second is f2.
The frames which concern us are f1f2 or left-center, and f2f2, center-center.
The left-center frame, f1f2, holds the indexes, Home, Core, School.
The center-center frame, f2f2, holds each contents-page.
Clicking on a chapter in the contents-page, opens a chapter.
Each chapter opens in its own window (target="w"), outside of the website frames.
Stylesheets
There is only one stylesheet since the purple left-indexes incorporate their style with their own headers (since this increases speed without increasing disk space).
The only stylesheet is f2w.css for all the chapters:
- the "contents-pages" opening in the main window, frame f2f
- the chapters opening in their own window, leaving the contents-page in view for faster reference. (There is no need to click the [Back] button.)