Reproduced with permission of the copyright owner. Further reproduction prohibited without permission. Using Server-Side Include Commands for Subject Web-Page Management: ... Northrup, Lori;Cherry, Ed;Darby, Della Information Technology and Libraries; Dec 2004; 23, 4; ProQuest pg. 192 Tutorial Using Server-Side Include Commands for Subject Web- Page Management: An Alternative to Database-Driven Technologies for the Smaller Academic Library Lori Northrup, Ed Cherry, and Della Darby Frustrated by the time-consuming process of updating subject Web pages, librarians at Samford University Library (SUL) devel- oped a process for streamlining updates using Server-Side Include (SST) commands. They created text files on the library server that corresponded to each of 143 online resources. Include commands within the HTML document for each subject page refer to these text files, which are pulled into the page as it loads on the user's browser. For the user, the process is seamless. For librar- ians, time spent in updating Web pages is greatly reduced; changes to text files on the server result in simultaneous changes to the edited resources across the library's Web site. For small libraries with limited online resources, this process may provide an ele- gant solution to an ongoing problem. The migration of print ed subject guides and p athfinders to Web pages began almost concurrently with th e creation of library Web sites. Dunsmore relates that this online mi gra tion dur- Lori Northrup (lanorthr@samford.edu) is Reference Librarian, Ed Cherry (cecherry @samford.edu) is the Automation Librar- ian, and Della Darby (dhdarby@samford. edu) is the Coordinator of Reference and Government Documents at Samford University Library, Birmingham, Alabama. in g the 1990s was follow ed almost immediately by articles on the d esig n, construction, usability , and maintenanc e of Web-ba sed subject guides. 1 A scan of recent literat ure (for example, Dean; Roberts; Davi dson; Grimes and Morris; and Galvan- Estrada) suggests that onlin e access to library resources has becom e the norm, and that librarian s struggle with the tim e necessary to maintain th ese guides online. 2 In an effort to reduce time sp en t maintainin g subject guides to Int erne t, print, and online resources, librari ans are discove ring more efficient methods of resource management for their Web-mounted subject guid es and pathfinder s. Roberts , Davidson, and Ga lvan- Estrada d escr ibed variations of data- base-driv en technology th at generate dynamic subject guides to library res ources; a common database of reso urces that have been descrip- tive ly enhanced for retrieval pro v ides the backbone for a system th at crea tes subject guid es for the user at the point of query. ' Patrons can then search for materials that ma y cross disciplinary lines, and receive a more targeted result list than the y would ha v e rece ived had they only combined two s tatic subject bibliographi es from related fields. The primary advantage to this type of retrieval system , for the librarian, is that updates can be done at one central location-within the database-and will then appear when the upd ated item is viewed on any portion of the library 's Web site generated from that database . Libraries that have adopted data- ba se-driven technologies hav e done so because their resource listings have exceeded m anageable capacity. Selected resourc es from the Int erne t or from librar y electronic holdin gs have reached a numb er that is difficult for available staff to maintain , especially acro ss hundr eds of static Web pages. For one library , this might mean a col- lection of mor e than two hundred; for larger librar y, this critical point might be reached only after eight hundred resources were gathered. At some 192 INFORMATION TECHNOLOGY AND LIBRARIES I DECEMBER 2004 point in the collection of resourc es, the amount of work n ecessa ry to create a database-driven syste m will be less than the pot en tial workload for updating individual pages. For the creat ors of these database- dri ven systems of resource retri eva l and displa y, th e time inve sted in the database sys tem grea tly outweighs th e potential time lost in upd ating what Davidson has describ ed as "hundreds of p ages of HTML con- taining multipl e occurrences of the same information , each of which nee ds to be checked and updat ed in response to even trivial changes in title or URL." 4 However, the invest- m ent of time and labor neces sary to th e creation of a populated database should not be downplayed. Davidson also notes "th e process of recrea ting or migrating an entire site to a data- ba se-driven platform is time- and lab or -intensive ."5 Indeed, Rob er ts sugg es ts that the labor and time required of library staff to get the sys - tem running at full potenti al out- weighs any technical issues involved in creating th e database. 6 In Galvan- Estrada 's case, librarians created tools spe cific to the sys tem to facilitate entr y of dat abase information , th ereby incr easi ng initial time and lab or investm ents. 7 This method for handling a multi- plicity of Web pages and resources may work well for colleges and uni- versities with hundreds of resources to be repeated across searche s or sub- ject pages. For some libraries , how- eve r, the critical amount of resources tha t can spur tha t type of d ecision ma y never be reached. A closer loo k at one small acad emic library 's efforts to reduce time spent in updating static HTML subject guides may be helpful to other librari es in similar situations . Samford's Situation Samford Univ ers ity is a small- to medium-sized institution , with about 2,900 undergr aduate and 1,500 grad- u ate students. The campus h as five Reproduced with permission of the copyright owner. Further reproduction prohibited without permission. information units: the university library, the law library, the education curriculum center, the career devel- opment center, and the drug informa- tion center. The university library is the primary information center for all disciplines except law. Within the ref- erence department, which is one of several university library depart- ments, four full-time librarians are responsible for general reference, government documents reference, and maintenance of the department's designated Web pages on the library's Web site. Like the majority of academic libraries, Samford University Library (SUL) provides subject access to its electronic resources. SUL' s practice is to provide static-subject Web pages that include a list made up of (1) peri - odical databases of primary subject importance, databases of secondary importance, and general databases; (2) reference books; and (3) Web sites. Each reference librarian is responsible for the creation and maintenance of selected subject pages and depart- mental pages. The department also maintains a page with an alphabetical list of all SUL subscription databases and some free databases. It is from this list of commonly used resources that librarians select materials to fill the top portion of the subject pages . Subject pages have undergone sev- eral metamorphoses in recent years. One major change was to add brief descriptions to each title on the data- base list while maintaining links to pages that held more in-depth infor- mation about each of the databases. Because a database may be listed on two or more subject pages, these changes required a considerabl e amount of repetitious updating . The initial changes were made to the alphabetical list, and then the HTML code was copied into each of the sub- ject pages where the title was listed. Copying and pasting in this way helped to ensure consistency across subject pages. When a recent review of SUL's Web-site statistics indicated that the description pages were receiving little or no activity, the reference librarians decided to enlarge the descriptions under each database title on the list and remove the links to the descrip- tion pages. This would provide more initial information for the patron while eliminating the Web team's maintenance of underutilized pages. Making these changes across all the SUL subject pages and some other affected pages resulted in hours of HTML correction . For each change made to the alphabetical list of resources, several other subject Web pages had to undergo the same change. For example, librarians were copying the information for Academic Search Elite (ASE) and InfoTrac OneFile across every subject page. Recently, faced with another update of all of the subject pages due to a database name change, the refer- ence librarians decided to find a method that would minimize the repetition of effort required for this and future overhauls of the SUL database lists. Some informal discus- sion among reference librarians and with the automation librarian had concerned recent literature on data- base-driven Web sites; however, the general consensus was that SUL had neither the time nor the need to take such a significant leap. The total number of items on the alphabetical list of resources at that time was 144. Adopting a new platform of opera- tion in a database-driven model seemed too large an undertaking for SUL' s small list of resources. The ref- erence coordinator consulted with the automation librarian about the possibility of using include statements in place of each database title and description. The Web team was already using include statements for the headers and footers of all library Web pages. Include Commands Include commands are a type of SSI code. Fagan explains that through using SSI codes, a Web author with no knowledge of programming can insert set groups of data into an HTML Web page. Carefully con- structed statements within the HTML page give the server a command to locate and insert a piece of informa- tion (a date, a text file, a program). When a user requests a page (clicks on a link for the page), the server loads the page, inserting the requested material in place of the SSI code on the page ." The Web server executes SSI code before the Web page is transferred to the browser making the request. This means that the use of SSI is not browser-dependent. SSI directives work regardless of security or pri- vacy controls in the browser, such as disabling JavaScript or cookies. Mach notes that this type of retrieval and substitution can be especially helpful for material that is used repeatedly on several library Web pages. The Web author can cre- ate one file containing the informa- tion used on several pages; then, when a change is made to that file, it is repeated across all Web pages that include that file. 9 As mentioned above, SUL Web pages all include the same header and footer; these head- ers and footers do not appear in the original HTML code for the pages . Instead, there is a command that tells the server to locate the header and footer files and include them when the page is loaded on a browser. The user does not know that SSI coding was used; for the user, the page appears complete. If a change needs to be made in a footer , then the change is made to the file containing that information. Changes appear on all pages that refer to the edited footer file. Library Literature on the Use of SSI Somewhat slow to adopt SSI capabil- ities, librarians have recently made excellent use of this elegant resource . USING SERVER-SIDE INCLUDE COMMANDS I NORTHRUP, CHERRY, AND DARBY 193 Reproduced with permission of the copyright owner. Further reproduction prohibited without permission. Current articles tend to be written with the understanding that many librarians who work on their library's Web site may not have the experience or levels of access necessary to make server changes. Articles focus more on the implementation of the syntax at the level of Web-page maintenance and less on server technology. Authors in the most recent publica- tions have been more likely to offer examples, and to speculat e on uses that, while they are not entirely inno- vative, hav e not been fully taken advantage of in the past. Using SSI to include text files in a Web page has been mentioned as a possibility since the first article, but later articles have tended to amplify the possibilities for this type of include command. In a slight shift of emphasis, later articles have tended to downplay the added server strain that was once a matter of great concern for SSI users. SSI statements have probably been in use in libraries since servers were capable of processing them; docu- mentation accompanying servers includes information on their use, as do some HTML manuals for begin- ning Web-page creators. Reference to the use of SSis in a library environ- ment does not appear until 2000. Notess's article provides a good, con- cise overview, and points to several helpful resources for the webmaster. Notess mentions common uses of SSI commands that will provide knowl- edge about the page, such as "current date and tim e, the LTRL of the page, the directory in which the file is located, the kind of browser the user has, or pull in content from separate files to construct the page before it is delivered." He elaborates on this point by stating that "a simple text file can contain the content [for a Web page], and people with no HTML experience can be given access to change that text." 10 While he mentions this possibl e use of the SSI include command for text files, Notess's examples all concern the echo com- mand. Notess does mention that SSI can possibly cause server strain but states that "includes add very little extra load" [emphasis added]. 11 Later articles tend to mirror Notess's in describing situations appropriate for the use of SSI and in noting possible difficulties and con- cerns. Mach's article assumes a bit more knowledge of servers and also access to server set-up fea- tures, but it is written in clear explanatory language and provides exc ellent examples of commonly used SSI commands, including fig- ures to illustrate those uses. She elab- orates on Notess's suggestion about text files, and makes the suggestion that if non-HTML files are the targets of SSI commands, that they be given an extension such as .txt, so that they will not be indexed as Web pages. 12 Also notable is her assertion that "most Web servers should be able to handle the extra load of parsing all files and simply using th e .html extension already in place." 13 Written with an eye to those who are not Web or server administrators, Pagan's article one year later provides many example screen shots and a step-by-step guide to implementing SSI. The information here is similar to that in Mach 's article, but the style is more accessible to the less-experi- enced Web site developer. Like Mach and Notess, Fagan mentions the use of non-HTML files and clarifies the idea of having an "all-text file, which could be ftp'd to the Web server." 14 As with the other authors, she mentions that enabling SSI on a server can result in the loss of "at least microsec- onds of time" as pages are parsed and reconstructed for the browser .15 She explained, though, that "SSI is used on large Web sites in some fairly com- plex ways without causing any dis- cernible time lag . The question is one of how busy your Web server is; if it is not overburdened with requests, it will easily handle the additional load of parsing files." 1" She rightly asserts that slow Internet connections or older, slower patron PCs are more likely to cause delays than is SSI load on a server. 17 194 INFORMATION TECHNOLOGY AND LIBRARIES I DECEMBER 2004 These articl es demonstrate an organic movement toward wider use of SSI capabilities. All of them men- tion the potential to use SSI for por- tions of pages that are the same, such as headers and footers. Each of them also mentions the use of SSI to include text files that Web authors without HTML experience can edit. What they do not cover is the use of SSI to include text files that are repeatedly used in the body of multi- ple Web pag es. Examples given are for Web page s with significant blocks of text that might be written at differ- ent times by different authors. The use of SSI include commands at SUL to insert pieces of identical text across many pages, while not groundbr eak- ing , is significant in light of libraries' recent efforts to handle large num- bers of electronic resources. SUL's Experience As the literatur e and server technol- ogy have advanc ed over the last few years, there has been a noticeable move from emphasis on the strain that SSI can cause to acknowledge- ment that the technology has become more capable in handling that strain. This is not to say that strain on the server does not occur. The user man- ual for Apache servers clearly states that "while this load increase is minor, in a shared server environ- ment it can become significant." 18 However, the increases in server speed and capability certainly make it more feasible to use SSI in quantity than it was in the past, and library lit- erature supports that view. Informal information from Web discussions and Web-development sites is much more emphatic . Recent discussion on theList at evolt.org focused on this issue and elicited the following from Baratta: "Today's servers are super charged compared to just a few years ago, and most people won't see the traffic levels that give SSI overhead a chance to affect serv- ing time." 19 Reproduced with permission of the copyright owner. Further reproduction prohibited without permission. The server statistics at SUL bear out this theory. The library's six-year- old Apache server last year averaged slightly more than 300,000 hits per month. The average increases some- what to around 340,000 hits during the nine months of Samford' s fall and spring semesters. This total number of hits includes all catalog searches as well, as this server also hosts SUL' s automated library system. Despite this seemingly large number of hits, the server usually reports that it is 80 percent to 90 percent idle even dur- ing the 8 A.M. to 5 P.M. time slot dur- ing which it does the major portion of its work. At the time these statistics were gathered, SSI was already in use for the inclusion of URLs, last update dates, and some header and footer information. The commands direct- ing the server to provide this infor- mation to the browser are more taxing to the server than commands employing the include command. After the addition of four to ten include commands on each of thirty- seven subject pages, and the con- struction of one alphabetical list consisting only of 143 include com- mands, the load on the server remains at less than 20 percent. This load is on a server with a 200 MHz PowerPC processor, with 512 MB of RAM. Certainly each library has its own server situation, and this solu- tion for handling occasional updates to electronic resources information on library Web pages may not work for all. Consultations with the automation librarian or computer technology department should verify specific limitations and requirements for using SSL SUL also tested to see whether the use of SSI would result in longer page load times. The download of two identical (to the user) pages, one static and the other built from include directives, was timed. There was no visible difference between the two. A more rigorous test may have detected a difference measurable in milliseconds. However, SUL librari- ans feel that the user's connection speed has a larger effect on the page load time than the use of SSL Background The evolution of this process for SUL moved rather quickly from inception to application, involving only slight changes to the library's normal processes for updating Web pages. The most time-consuming tasks involved creating the include .txt files at the outset, and then providing a database of the completed include commands. Each time a database title is added to the collection, the automa- tion librarian creates a Persistent Uniform Resource Locator (PURL) for that database. This is due to the tendency of the database vendors to alter the URL through which access is gained and because the library some- times switches vendors for its data- bases. With this procedure in place, the automation librarian can make the change to the URL in one place and every link to that database will connect properly. This saves consid- erable time and effort for the librari- ans who maintain the subject pages. Librarians were in the habit of using that PURL to create a section of HTML that presented the database link to the patron. Figure 1 illustrates a portion of HTML code for EBSCO' s ASE as it appears in a text editor. In addition to appearing in sub- ject pages on various topics, subscrip- tion databases and commonly used Web resources are listed in one alpha- betical listing. This page, updated first when changes are made, is where librarians came to copy the current code for a database. In this way, SUL attempted to keep pages consistent. Text for a database could be copied and pasted into the HTML editor as a librarian worked to update the pages. While this seemed like a smooth process, the simple reality of having to copy and paste one database change to, potentially, all subject pages was too time-consuming to make it an efficient process. Updates to the subject pages and alphabetical list are done as time permits. Often, one or two librarians were unable to make the changes until weeks had passed, resulting in a Web site that was inconsistent and sometimes mis- leading. For instance, dates of data- base coverage might change and be documented on the alphabetical list, but not on all the subject pages listing that database. The Way SUL Does It Now When it was decided to try the include commands as an alternative for updating database information and streamlining the update process for librarians, changes were made over the course of three days, and occurred in three phases. In phase one, the alphabetical list was carved into 143 individual .txt files, each of which contained infor- mation for one database or Web resource. Each .txt file was saved on the server with a name correspon- ding to the PURL that is used for that database, or with an easily recogniz- able name constructed from the title or URL of the resource. The HTML code in figure 1 became a .txt file titled eb-ase.txt. Using the PURL for the title of the file makes it more eas- ily recognizable and acquaints librar- ians with the PURLs already in use. In phase two, one librarian cre- ated an Excel file containing the fol- lowing: (1) an alphabetical list of resource names; (2) existing names for the corresponding .txt files; and (3) component parts of an include command for each resource. The final column concatenates these compo- nent parts together resulting in a ready-made include command for each resource. Figure 2 illustrates a portion of this table. In phase three, librarians used th e table of include commands to select the resources they wanted on thei r pages. This entailed replacing a block USING SERVER-SIDE INCLUDE COMMANDS I NORTHRUP, CHERRY, AND DARBY 195 Reproduced with permission of the copyright owner. Further reproduction prohibited without permission. of HTML code with one include com- mand . The examp le of HTML code in figure 1 would be reduced to the fol- lowing statem ent: Fig. 2. Database Names, .txt File Names, and Resultant Include Commands In addition, librarians who are using this simple technique do not need extensive training. The creation of the Excel database of include com- mands allows for quick additions to an existing page, or the creation of new subject pages. Librarians using the include commands can simply copy and paste them; there is no need for them to understand the syntax or to be able to repeat it. This makes using SSI particularly attractive to staff who do not want the added bur- den of further training in HTML. The librarian responsible for creating the .txt files and the Excel database of statements demonstrated the copy- ing and pasting of the include state- ments to all the other librarians who edit HTML pages in a one-time ten- minute training session. The only additional training issue has involved page structure. Since the library uses a table structure for the subject pages, all table tags are included in the database .txt files. Making sure that librarians under- stand that they do not need to recre- ate the table tags has been the only additional training issue for the department. As librarians begin to use these commands, links to resources across subject pages will look the same and will provide the user with the same information. This increased unifor- mity results in a more professional appearance for the Web site as a whole. Disadvantages This revolution in the maintenance of subject pages has not been without its disadvantages. The primary com- plaint by librarians using SSI include commands is that they cannot pre- view their changes in their HTML editors. SUL's department uses the CoffeeCup HTML Editor, which allows previews, but the previews are not visible for items that are retrieved using SSis. This is because the page is not fully assembled until the server assembles it. When the librarian views the page in the editor, 196 INFORMATION TECHNOLOGY AND LIBRARIES I DECEMBER 2004 Reproduced with permission of the copyright owner. Further reproduction prohibited without permission. prior to uploading it to th e server, the include commands are without tar - gets. The target .txt files are on the server. When a user requ ests a p age, include commands pull in the missing pieces (the .txt files, or other files); th en, th e completed pag e is seam- lessly presented to the us er via his or her brow ser. As Mach notes, "Pre- view ing a Web page without crucial element s . . . can be di sconcerting, esp ecially to visuall y oriented d esign- ers."20 In SUL's experienc e with thi s particular issue, librarian s who are uncomfortable loading pages with locally invisible elements can load th em into temporary fold ers on the server, check them for errors there, and then move them to th eir appro - priate dir ectories . Conclusion Situational factors have allowed SUL to imple ment this change with sur- prising ease and speed. Because the library has its own server, and because th ere is an automation librar- ian on staff, communicati on and chan ge have been easy and efficient. Librar y staff deduce that it is becau se the include command of SSI is b eing u sed more than other possible com- mands that the librar y is not experi- encing an increase in loadin g tim e on its pages. Of course, the size of SUL's reso urce list makes this kind of solu- Art & Tec h EBSCO tion feasible ; certainly, if the librar y were working with hundreds of resources, it would be more likely that a datab ase -driv en strategy would be ad op ted . The simplicity and elegance of the SSI include com- mand process has encourage d adop- tion, and SUL ha s seen no ill effects from the us er side of operations. Librarian Web au th ors qui ckly over- came any slight di sco mfort with the new proc ess and are now able to devote a portion of editing time to other, less m ono tonous tasks. References and Notes 1. Carla Dun smore, "A Qualitative Study of Web-Mounted Pathfinders Cre- ated by Academic Business Libraries," Libri 52, no . 3 (Sept. 2002): 140-41. 2. Charles W. Dea n , "Th e Public Elec- tronic Libr ary : Web-based Subj ec t Guides," Library Hi Tech 16, no. 3-4 (1998): 80-88; Gary Rob erts , "Designi ng a Data- base-Driven Web Site, or, The Evolution of the Infoiguan a," Computers in Libraries 20, no. 9 (Oct. 2000): 26-32; Bryan H. Davidson, "Database-Driven, Dynamic Content Delivery: Providing an d Manag- ing Access to Online Resources Using Microsoft Access and Ac ti ve Server Pages," OCLC Systems and Services 17, no . 1 (2001): 34-42; Marybeth Grimes and Sara E. Morris , "A Co mp ari so n of Acade- mic Librarie s' Webliographies, " Internet Reference Services Quarterly 5, no . 4 (2001): 69-77; Laur a Ga lv an -Estra da, "Moving towards a User-Cent ere d, Database-Dri- ven Web Site at th e UCSD Libraries," Index to Advertisers 179 200 LITA Internet Reference Services Quarterly 7, no. 1-2 (2002): 49-61. 3. Roberts, "Infoiguana "; Davidson, "Da tabase Driven"; Galvan- Estrada, "User -Cen tered, Database-Driv en Web Site." 4. Davidson, "Database Driven," und er " Int roduction ." 5. Ibid., under "Developm ent Con- side ra tions." 6. Roberts, "Infoiguana ," 32. 7. Ga lvan-Estrada, " U ser -Centered, Database-Driven Web Site, " 55-56. 8. Jody Co ndit Fagan, "Server -Side Includ es Made Sim ple, " The Electronic Library 20, no. 5 (2002): 382-83 . 9. Michelle Mach, "The Service of Serv er -Side Includes," Information Tech- nology and Libraries 20, no. 4 (2001): 213. 10. Greg R. Notess, "Serv er Side Includes for Site Management," Online 24, no. 4 (July 2000): 78, 80. 11. Ibid. 12. Mach, "Se rvice of Server-Side Includ es," 216. 13. Ibid., 214. 14. Fagan, "Server -Side Includ es M ade Simple," 387. 15. Ibid., 383. 16 . Ibid. 17. Ibid. 18. Apache HTTPD Server Project, "Apac h e HTTP Server Version 1.3: Secu - rity Tips for Server Configurati on," Th e Apache Softwar e Foundation. Accessed Oct. 29, 2003, http: / / httpd. apac he.org/ docs / misc / sec urity _tips .html. 19. An th on y Baratta, e-mail to th eLis t mailing list, May 16, 2003, Accessed Nov . 4, 2003, http:/ / lists.evolt.or g/ archive/ Week-of-Mon-20030512/140824.html. 20. Mach, "Service of Serv er -Side Includ es," 217. cover 2, 191, covers 3--4 USING SERVER-SIDE INCLUDE COMMANDS I NORTHRUP, CHERRY, AND DARBY 197