How To Specify Items to Be Cached in a .cdf File (183804)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 4.0
  • Microsoft Internet Explorer (Programming) 4.01
  • Microsoft Internet Explorer (Programming) 5
  • Microsoft Internet Explorer (Programming) 5.5

This article was previously published under Q183804

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.
<WWITEM HREF="http://www.microsoft.com/sound.wav">
   <USAGE VALUE="NONE"></USAGE>
</WWITEM>
				
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"/>
   <WWITEM HREF="http://www.microsoft.com/sound1.wav"/>
   <WWITEM HREF="http://www.microsoft.com/sound2.wav"/>
   <WWITEM HREF="http://www.microsoft.com/sound3.wav"/>
</CHANNEL>
				

REFERENCES

For more information, please refer to Content Delivery and the CDF Reference in the Microsoft Developer Network:

Modification Type:MinorLast Reviewed:8/30/2004
Keywords:kbcode kbhowto KB183804