Confirmed users
920
edits
LesOrchard (talk | contribs) |
LesOrchard (talk | contribs) |
||
| Line 57: | Line 57: | ||
the current request URL are included in the response. | the current request URL are included in the response. | ||
All HTML content must also '''be well-formed XML'''. | |||
Since multiple snippets can be included in the same response, the '''Sort order priority''' field is used to provide a sort index. So, for example, if you have | |||
Since multiple snippets can be included in the same response, the '''Sort order priority''' | |||
field is used to provide a sort index. So, for example, if you have | |||
some JavaScript to include after all snippets, a value of 9999 will place it | some JavaScript to include after all snippets, a value of 9999 will place it | ||
after than the default of 0. If you have CSS to place before any other | after than the default of 0. If you have CSS to place before any other | ||
| Line 71: | Line 66: | ||
==== Considerations for external media used in snippets ==== | ==== Considerations for external media used in snippets ==== | ||
Any HTML, CSS, or JavaScript can be used in snippets. However, any references to external media, such as images, should be encoded as data: URIs so that the snippets can be self-contained. | Any HTML, CSS, or JavaScript can be used in snippets. However, any references to external media, such as images, should be encoded as [http://en.wikipedia.org/wiki/Data_URI_scheme data: URIs] so that the snippets can be self-contained. | ||
For example, a tool like [http://software.hixie.ch/utilities/cgi/data/data The data: URI kitchen] can be used to convert an image file into a data: URI. | For example, a tool like [http://software.hixie.ch/utilities/cgi/data/data The data: URI kitchen] can be used to convert an image file into a data: URI. | ||