Chapter 5 HTTP Client Requests and Header Settings
HTTP Header Settings
Use the following ASP sample script to set the MIME type and to serve the file
that is specified in the #include command:
<%@ Language=JavaScript%>
<%
Response.ContentType = "audio/basic";
%><!--#include file="filename.raw" --><% Response.End();%>
Using script to generate the MIME header when playing a sound provides an
advantage because you may also include a refresh header to take the phone to a
subsequent URL. Usually, you can set the MIME type for pages in any web server
by simply performing an association to the .xml or .raw file extension. Your web
server documentation should explain how to accomplish this. This action allows
you to serve static pages without the need for writing script.
Content Expiration Header Setting
The expiration header can control which URLs are added to the phone URL
history. This behavior differs slightly from traditional web browsers but is
implemented to perform the same function. Disable the back button functionality
to avoid calling a URL twice.
This functionality allows you to make the content of any page that is sent to the
phone expire. When a user presses the Exit softkey, the user goes back to the last
URL that did not expire when it was loaded. This differs from traditional browsers
by not considering the current freshness of the data but the freshness of the data
when the URL was requested. This requires you to have a page expire when it is
first loaded and to not set a time and date in the future.
The following example shows how to have content on IIS expire by using
Active Server Page (ASP):
<%@ Language=JavaScript %>
<%
Response.ContentType = "text/xml";
Response.Expires = -1;
%>
The "Expires" property specifies the number of minutes to wait for the content to
expire. Setting this value to -1 subtracts 1 minute from the request time and
returns a date and time that have already passed.
Cisco IP Phone Services Application Development Notes
OL-5375-01
5-65
Download from Www.Somanuals.com. All Manuals Search And Download.