Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Example 1: Saving Bandwidth by Using XSLT for Headers and Footers - Page 3

October 28, 2002

Let's start by taking a normal web page, and seeing how we can use XSLT to add some standard content to the page. In this example, we'll add a header and footer to a simple page of XHTML.

All of the examples in this chapter can be downloaded from the glasshaus web site at http://www.glasshaus.com. The downloadable versions have additional comments so you don't need to keep referring back to the book as you read them.

The benefits of doing this in XSLT are as follows:

·          We only need to store one copy of the header and footer code to cover every page on the site, making it easy to change them globally without editing every single page.

·          Users only need to download the header and footer XSLT code once, even though they are used on every page in the site. This can give bandwidth savings, which is important if your service provider charges by the megabyte, or if you are supporting modem users.

·          Server processing is reduced as all the work is being done on the client.

How else could we do it? We could manually add the header and footer to every web page, but this would result in a site maintenance nightmare, especially for a large site. The other alternatives are as follows:

·          By using Server-Side Includes (SSI) to include standard header and footer content on every page.

·          By using a scripting language (such as ASP, PHP, or JSP) to generate web pages with the header and footer included.

Although these methods share the first advantage of only storing one copy of the header and footer, they do not reduce the bandwidth or server load.


Introduction to XSLT - Page 2
Practical XML for the Web
Take it From the Top - Page 4


Up to => Home / Authoring / Languages / XML / PracticalXML




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers