Sending Cookies to the Web Server

When a client connects to a Windows Media server, it sends all unexpired cookies for which the domain and path are consistent with that of the server.

Note

   Cookies are supported by Windows Media Player 9 Series and later versions.

When you request a playlist from a Web server, you can send a specific cookie to it by including the %UserCookie_CookieName% string in the query component of the URL and replacing CookieName with the string name of the cookie. The Windows Media server places the cookie in the request header. For example, if the client sends two cookies named Cookie_1 and Cookie_2, the cookie header is formatted in the following manner. The strings after each name contain cookie data.

    Cookie: Cookie_1=251hgkt68ghjd; Cookie_2=dfslk/45ngtf;

The following example illustrates how to use the %UserCookie_CookieName% string when you request a playlist from a Web server.

    <?wsx version="1.0"?>
    <smil>
        <media src="httpd://web_server/playlist.asp?%UserCookie_Cookie_1%;" />
    </smil>

See Also

Concepts

Downloading a Playlist from a Web Server