Preload element is a great resource for improving your application’s
performance and load time by preloading external content prior to
loading it through HTTP requests. Including a
Preload element instructs the container to
fetch data from an external source while the gadget is being
gadgets.io.makeRequest, which fetches
data from external sources. When used with
gadgets.io.makeRequest method request will
return the content instantly.
For example, if the gadget will be making a request to http://www.test.com and we want to preload the content,
we’d set up the
Preload element in
the following way:
<ModulePrefs> <Preload href="http://www.test.com" authz="signed" /> </ModulePrefs>
Preload has a few available
attributes, listed in Table 3-2, that allow
further levels of customization.
Table 3-2. Preload attributes
The URL for the content that the container is to preload. This field is required.
The authorization type to
use when requesting the content. This field is used in
conjunction with the authorization field of the