The Telerik Platform product is retired.Learn more

Making a File Link Available Offline

Making a File Link Available Offline

You can make a file download link work offline when using the Backend Services JavaScript SDK. The preferred method for doing this is using HTML tag processing. It is much more automated and allows you to add offline download support to an app without making changes to how you render or make bindings in its UI.

Supported is the anchor (<a>) HTML tag.

After you set the HTML elements as shown in this article, you need to process them as described in Processing HTML Helpers Elements.

Setting Up an A Tag

To make a file specified through the <a> tag work offline, you need to modify its tag like this:

  • Rename the href attribute to data-href, leaving the original link address unchanged
  • Add the data-offline attribute
<a data-href="" data-offline />

The data-offline attribute can also be set explicitly to true or false. For example: data-offline="true". The empty string, as well as any other string that differs from "false", are evaluated as true.

All attribute names can be configured while initializing the SDK. For more information see Configuring HTML Attributes.

See Also

Contact us: +1-888-365-2779
Copyright © 2016-2018, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.