LESSON 4: Setting a time-to-live (TTL) value
This tutorial explains how to limit the frequency of Web Slice updates.
This is the first of two options to control the network load placed on your servers.
Internet Explorer 8 checks a URL on a regular basis to get updated content. The time-to-live (TTL) value determines the minimum time that Internet Explorer must wait before requesting an update. This value is compared against the user's default feed refresh interval. The larger of these two values is used to schedule updates. For example, given a TTL of 12 hours and a default feed refresh interval of 24 hours, the Web Slice will only be updated once daily.
The following class name declares the TTL:
- class="ttl" — The inner text of this element indicates the number of minutes between updates.
<p style="font-size:xx-small">Updated every <span class="ttl">60</span> minutes.</p>
Add a minimum refresh interval to the weather Web Slice.
A few things to remember:
- The minimum refresh interval is 15 minutes. Lower values of TTL are reset to 15 minutes.
- The TTL value must be within the hslice element, but it does not need to be within entry-content.
- It is contrary to microformat design principles to use style="display:none" to hide markup from the user; however, a TTL value may be hidden.
- The value of TTL is the number of minutes before Internet Explorer should check for a refresh.
Check your work
Try to set the update schedule of the Web Slice.
- Right-click the Web Slice text, and select Properties from the option menu.
- Select the Use custom schedule radio button, and locate the "Feed minimum" value in the drop-down list.
Check out the example implementation in Source Listing #4 if you have any trouble.
Go back to LESSON 3: Setting an expiration time