HOWTO: Specify Items to Be Cached in a .cdf File

ID: Q183804


The information in this article applies to:


SUMMARY

From a channel definition file (.cdf), you can specify which items should be cached, without having the items appear in the channel bar's item list. For example, you may wish to specify that a .wav file be downloaded as part of the subscription update so that it gets cached and is available when the user browses offline.

This article describes the method that is used to perform this function.


MORE INFORMATION

In order to specify that an item should be cached but not viewed in the channel pane, use the tag <USAGE VALUE="NONE"> in your .cdf file. For example, to specify that a .wav file should be cached, place this HTML in your .cdf file.


<ITEM HREF="http://www.microsoft.com/sound.wav">
   <USAGE VALUE="NONE"></USAGE>
</ITEM> 
Note that in XML, an element that does not have child elements can be represented in a more compact format. For instance, the above <USAGE> line could be written more compactly in this manner (note the final / at the end of the tag):
<USAGE VALUE="NONE"/>
Also, when listing multiple items that are to be cached but not viewed in the channel pane, instead of marking each one with a <USAGE VALUE="NONE"/>, it is better to place them all in one sub-channel that is marked with a usage tag, as illustrated in the example below:

<CHANNEL>
   <USAGE VALUE="NONE"/>
   <ITEM HREF="http://www.microsoft.com/sound1.wav"/>
   <ITEM HREF="http://www.microsoft.com/sound2.wav"/>
   <ITEM HREF="http://www.microsoft.com/sound3.wav"/>
</CHANNEL> 


REFERENCES

For more information, please refer to Content Delivery and the CDF Reference in the Internet Client SDK Help:

http://www.microsoft.com/msdn/sdk/inetsdk/help/

Additional query words:


Keywords          : kbcode kbIE500 InetSDKInfoDev 
Version           : WINDOWS:4.0,4.01
Platform          : WINDOWS 
Issue type        : kbhowto 

Last Reviewed: April 27, 1999