DYNAMIC
CONTENT
Dynamic content is any web content that is
processed by the web server before sending the results to the web browser.
In contrast, static content is content which is sent to the browser
without modification.
Common forms of dynamic content are Active
Server Pages (ASP), Java Server Pages (JSP), Cold Fusion (CF), and
HyperText Processor (PHP) pages. WebSite Director (WSD) can manage
any form of dynamic content that uses normal files that reside on the web
server. Although these files can also retrieve content from
databases, the current release of WSD cannot be used to manage the
database content.
Dynamic Content Preview
Directory
When you use WSD to View or Preview with
static content, WSD will send the View or Preview request directly to the
web browser. When you View or Preview dynamic content, WSD uses a
"Dynamic Content Preview Directory" to temporarily publish the request so
it can be processed by the web server as it is delivered to the web
browser.
To set up a Dynamic Content Preview
Directory, use the following steps:
- Create a directory (such as "/preview")
under the Document Root directory of your web server. This
directory should be not be linked to from any pages on the web
site.
- Make the directory invisible during
Submit New Request processing by marking it as a "Private Directory" as
follows:
- On the Application Desktop click System
Administration; then click Maintain Web Site
- On the Maintain Web Site screen,
highlight the directory to be marked Private from the Directories and
Documents list, and click Properties.
- On the Directory Properties screen
select the checkbox by Private Directory in the "Flags" list.
- Enter the directory in the Dynamic
Content Preview Directory field on the System
Configuration screen (accessed from the System Administration
screen).
Mime
Types
WSD identifies the type of content being
worked on by using Internet-standard "Mime Types." Each type is
associated with the filename extension of a document. Mime Types are
also used by the web server to tell the web browser which type of content
is being displayed so that the browser can determine how to display the
content.
WSD looks up the Mime Type for a given
document by matching the filename extension with a Mime Type specified in
a Mime Types file. Unless a different Mime Types file is specified
during installation, WSD uses a standard set of Mime Types. These types
are contained in a file called "mime.types" that is installed in the WSD
installation directory. If the web server uses its own Mime Types
file (Apache does, Microsoft Internet Information Server does not), you
can configure WSD to use that Mime Types file.
- This can be done during installation by
specifying the path to that Mime Types file, or
- following installation by modifying the
"MimeFile" configuration entry in the wsd.conf configuration
file.
If WSD is configured to
use the web server's Mime Types file, WSD will always use the same Mime
types used by the web server. Some web servers only use the filename
extension, not Mime Types, to process certain forms of dynamic content
(such as ASP or JSP pages). Therefore, no standard Mime Types are
associated with these content types. However, because WSD requires a Mime
Type to process dynamic content,you may need to add new Mime Types for
certain types of dynamic content. Suggested Mime Types for ASP and JSP
pages are "application/asp" and "application/jsp" respectively. You
can add new Mime Types using the "Maintain Mime Types" screen.
- To access the Mime Types screens, click
System Administration on the Application Desktop; then click System
Configuration.
- On the System Configuration screen click
Mime Types, then select Add New Mime Types.
To tell WSD to process a specific content type (using
the associated Mime Type) as dynamic content during View and
Preview,
- Go to the Maintain Mime Types screen ,
select the Mime Type and click Edit Mime Type.
- On the Edit Mime Type screen select the
"Dynamic Content" option for that Mime Type.
Any Mime Type with that option selected will be
passed through the web server for special processing using the Dynamic
Content Preview Directory selected above.
In addition to using the Edit Mime Types
screen to set the Dynamic Content option, you can also select the
following options:
- Allow online editing of that
content
- Support the use of Page Layout
templates
If the results of
the web server's processing of the dynamic content contains relative URLs,
you may also want to enable the "Use Base Href" option. This option
will tell WSD to insert a "BASE HREF" HTML tag at the beginning of the
document. The use of the BASE HREF tag may interfere with certain
forms of dynamic content, so you may not wish to use that option for all
types of dynamic content.
Default Mime Types
If WSD is unable to find a Mime Type for a
given filename extension, it will use a default Mime Type of "text/plain."
This is the same default Mime Type used by most web servers. The Netscape
and Microsoft Internet Explorer browsers handle that default Mime Type
differently.
- Netscape honors the Mime Type and will
display the actual data in source form, even for binary
files.
- Microsoft Internet Explorer will ignore
that Mime Type, however, and will try to figure out the type of content
from the content data itself.
This distinction is most apparent when using dynamic
content that generates HTML output. If a Mime Type is not defined
for that type of dynamic content,
- Microsoft Internet Explorer will appear
to render the resulting page properly (since it identifies the content
as HTML and renders it accordingly). However, since it will not be
processed as dynamic content, you may also see non-HTML scripting
commands embedded in the output.
- Netscape will display the source of the
page as plain text.
|