Cisco Systems OL-20949-01 manual Set-Cookie Header Setting

Page 73

Chapter 6 HTTP Requests and Header Settings

HTTP Header Settings

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.

Set-Cookie Header Setting

A “cookie” is a term for a mechanism that the Web server uses to give the client a piece of data and have the client return the data with each request. The two traditional uses for cookies are:

For Web sites to store a unique identifier and/or other information on the client's file system. The information is available to the Web server on subsequent visits.

To track a unique identifier for state management. The client returns the cookie with each request and the server uses this identifier to index information about the current session. The identifier is commonly referred to as a session ID. Most Web servers have a built-in session management layer that uses this second type of cookie, which is commonly referred to as a session cookie.

The following example shows the Set-Cookie header that is returned to the browser when a request method is used:

Set-Cookie: ASPSESSIONIDGQGQGRLS=OCPNMLFDBJIPNIOOKFNFMOAL; path=/

The Cisco Unified IP Phone can receive and use a total of four cookies per host per session and can store information for up to eight sessions at once. Each cookie can be up to 255 bytes in size. These cookies are available until the server terminates the session or the client session has been idle for more than 30 minutes. On the latest generation phones which are capable of running multiple applications concurrently (Cisco Unified IP Phones 7970G, 7971G, 7961G, 7941G, 7911G), the session state is also cleared whenever the application window closes. This behavior is consistent with PC-based browsers and provides better security since anyone attempting to reopen a secure application would be forced to authenticate. If the client is connecting to a new server and all session resources are in use, the client clears and reuses the session with the longest inactivity time.

When using ASP on IIS the default server configuration automatically generates a session cookie and sends it to the client using the Set-Cookie header. This enables you to utilize the Session object from within ASP to store and retrieve data spanning multiple requests for the life of the session. When using JSP on Tomcat, the default configuration generates and issues a session cookie.

Cisco Unified IP Phone Services Application Development Notes

 

OL-20949-01

6-5

 

 

 

Image 73
Contents Text Part Number OL-20949-01 Americas HeadquartersCopyright 2004-2009 Cisco Systems, Inc. All rights reserved Iii N T E N T SDisplay Init Benefits Overview PrefaceRevision History AudienceChapter Description OrganizationViii Related Documentation Cisco Unified Communications Manager AdministrationCisco Unified IP Phone 7900 Series Cisco Unified Communications Manager Business EditionDocument Conventions Cisco Product Security OverviewConvention Indication Page Xii 1shows a sample text menu OverviewGraphic Menu on a Cisco Unified IP Phone Sample Page OL-20949-01 New Information for Cisco Unified Communications Manager New and Changed InformationOL-20949-01 Understanding Object Behavior CiscoIPPhone XML Objects1shows the supported XML objects for this release CiscoIPPhoneMenu XML Object DefinitionsDefinition CiscoIPPhoneTextSample User Input Display CiscoIPPhoneInputInputFlag Description CiscoIPPhoneDirectoryCustom Directories CiscoIPPhoneImagePacked Pixel Translation Example CiscoIPPhoneImageFile Resolution1Example ModelCisco Unified IP Phone 7970G Image File Display MonochromeCiscoIPPhoneGraphicFileMenu CiscoIPPhoneGraphicMenu5shows the display of the CiscoIPPhoneGraphicFileMenu CiscoIPPhoneIconMenu6shows an IconMenu on a Cisco Unified IP Phone CiscoIPPhoneStatus CiscoIPPhoneIconFileMenuCiscoIPPhoneStatus Dynamic Sizing of the Application Status Window7962G, 7965G 7970G/7971G-GE, 7975G, IP Communicator Phone Models Area Width Area Height 7940G, 7960GCiscoIPPhoneStatusFile Phone Models WxH No Timer WxH 7940G, 7960GText Area Size 7962G, 7965GBehavior Description CiscoIPPhoneExecuteCustom Softkeys CiscoIPPhoneErrorCiscoIPPhoneResponse SoftKeyItem NameDisplayed sofkey label/Name XML ConsiderationsXML Encoding Mandatory Escape SequencesCharacter Name Escape Sequence Supported Unsupported Application Event HandlersAttributes Attribute Description Event Handler Schema Application Management API Component APIsRTP Streaming API Interaction Rules with Legacy RTP URI Streams RTP Streaming SchemaXscomplexType Xsall Error Schema Examples Errors and ResponsesStart Media Stop MediaApplicable Condition Methods Http Result Code Type Data Supported URIs by Phone Model Internal URI Features7942G, 7962G 7906G 7945G, 7965G 7970G 6921 7905G 7911G 7921G 7940G 7971G-GE 6941Key Device Control URIsURI Format KeyDirectories Description and Alternatives Phone Unsupported ModelsURI DisplaySoftKey XML Displayable Object URIsQueryStringParam Select Exit Update Submit Search Cancel Next DialInternal URI Features XML Displayable Object URIs RTP Streaming Multimedia URIsInteraction with Call Streaming URI Formats RTPRxRTPTx Vibrate PlayInteraction with Incoming Calls Dial Telephony URIsSendDigits EditDialCondition Status Data Error and ResponseInit Application Management URIsNotify Called from SoftKey, with credentials, with data Called from SoftKey, no credentials, no data ApplicationAppactionpriorityidleTimerapplicationId Error and Response Http Client Requests Http GET Http Requests and Header SettingsHttp Server Requests Http Post See the Http Refresh Setting section on page 6-3section Http Header SettingsRefresh Display Sample Http Refresh SettingMime Type and Other Http Headers Content Expiration Header SettingSet-Cookie Header Setting Accept-Language Http Encoding Header SettingCiscoIPPhoneModelName Identifying the Capabilities of IP Phone ClientsCiscoIPPhoneDisplay CiscoIPPhoneSDKVersion Accept HeaderHtml URL XML URL Accessing IP Phone InformationOL-20949-01 Troubleshooting Tips Troubleshooting Cisco Unified IP Phone Service ApplicationsXML Parsing Errors Error Messages SDK Components Cisco IP Phone Services Software Development Kit SDKOL-20949-01 \CiscoIpServices\Tools Sample Services RequirementsOL-20949-01 Accessing Phone Service Administration IP Phone Service Administration SubscriptionField Description Adding a Phone ServiceField Description Service Parameter Information Defining IP Phone Service ParametersUser Service Subscription 10-1 DeviceListX ReportRestrictions BenefitsIntegration Considerations and Interoperability Performance and ScalabilitySecurity Related Features and TechnologiesSupported Platforms PrerequisitesError Codes Troubleshooting DeviceListX ReportsField Name Description 10-4Procedure Determining Problems With the Interface10-5 10-6 Object Definition CiscoIPPhone XML Object Quick ReferenceAppendix a CiscoIPPhone XML Object Quick Reference IndexA unique index from 0 to 9/Index OL-20949-01 Updated XML Parser and Schema Enforcement Cisco Unified IP Phone Services XML Schema FileCiscoIPPhone.xsd Xsdelement name=Name minOccurs=0 xsdsimpleType Xsdrestriction XsdsimpleType XsdsimpleType xsdrestriction base=xsdstring XsdcomplexType name=CiscoIPPhoneSoftKeyType xsdsequence Xsdelement name=Title minOccurs=0 xsdsimpleType Xsdrestriction XsdsimpleType Xsdattribute XsdcomplexType Xsdelement name=CiscoIPPhoneDirectory xsdcomplexType Xsdelement name=CiscoIPPhoneImageFile xsdcomplexType Xsdelement name=CiscoIPPhoneIconMenu xsdcomplexType Xsdelement name=CiscoIPPhoneGraphicFileMenu xsdcomplexType Xsdsequence Xsdelement name=Text minOccurs=0 xsdsimpleType Xsdsequence XsdcomplexType Xsdelement IN-1 NumericsIN-2 Html URLIN-3 IN-4 XML URL