Timed redirect and refresh

You can use attributes on the meta element to control timed redirects and refreshes. In XDIME 2 you use the property attribute and the namespace xmlns:mcs="http://www.volantis.com/xmlns/2006/01/xdime/mcs".

You can use attributes on the meta element to control timed redirects and refreshes. In XDIME 2 you use the property attribute and the namespace xmlns:mcs="http://www.volantis.com/xmlns/2006/01/xdime/mcs".

The name or property value is 'mcs:refresh'. The optional content attribute supplies the number of seconds between refreshes, and the redirect URL in the form [seconds;url]. If a URL is not provided the current page will be refreshed.

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
  xmlns:mcs="http://www.volantis.com/xmlns/2006/01/xdime/mcs">
  <head>
    <title>mcs:refresh</title>
    <meta property="mcs:refresh" content="5;http://www.volantis.com"/>
  </head>
  <body>
    <p>You will be redirected to www.volantis.com shortly</p>
  </body>
</html>

The time between refreshes may be specified as a real number. If it is negative an error will be caused. If a device does not support the resolution provided, then the value will be rounded up to the next higher amount at the required resolution.

The URL is an absolute or relative value. If a protocol does not support the type of value that you set, it will be converted as required.

Note:

You should take care when using small refresh intervals. If the value is too small users cannot return to previous pages before they are redirected back to the site, and excessive bandwidth can be used. Using values less then 0.5 seconds will cause some devices (such as those using HTML/XHTML) to have a refresh period of 0 seconds after the refresh interval is adjusted to the precision that those protocols support.

Related topics