HTML Include

<script type="edgeside/html-include" ...>

Fetches an HTML fragment from an arbitrary URL and includes it in the page.

Possible future enhancements:

Attributes

Name Description Required?
data-edgeside-input specifies a key under which it should expect to find data no
data-edgeside-endpoint specifies the endpoint from which to fetch an HTML fragment yes
data-edgeside-cache-ttl specifies a Time To Live value for caching of query results in the Cloudflare cache, in seconds (default = 60) no

Element content

Empty.


Examples

example1 - Include an HTML Fragment

Here we simply include a fragment of HTML from a fixed URL. In this case the URL is part of this site, but it could be from anywhere.

<script type="edgeside/html-include"
data-edgeside-endpoint="/examples/include/include1/index.html">

</script>

Live Results:

Live Results (Source):