Share via


prefetch Attribute

  Microsoft Speech Technologies Homepage

Specifies whether an external prompt resource should be loaded, synthesized, and cached when the page is loaded. Optional.

HTML <prompt prefetch = boolean
JScript prompt.prefetch = boolean

Remarks

The prefetch attribute is generally set to true when an external prompt resource is likely to require a lengthy download. The prefetch attribute indicates that the external prompt resource should be loaded before it is needed, if possible. The default value for the prefetch attribute is false.

Example

The following script demonstrates the use of the prefetch attribute.

<prompt id="p1" prefetch="true">
  <content href="http://mybank/getStockName.asp?id=1" />
  <content href="http://mybank/getStockValue.asp?id=1" />
</prompt>

<prompt id="p2" prefetch="true">
  <content href="http://mybank/getStockName.asp?id=2" />
  <content href="http://mybank/getStockValue.asp?id=2" />
</prompt>

<body onload="p1.Queue();">
  ...
  <input type="button" value="play" onclick="PromptQueue.Start(); p2.Queue();" />
  <input type="button" value="next" onclick="PromptQueue.Stop(); PromptQueue.Start;"/>
  ...
</body>

See Also

prompt Element