What are modern uses of script type=”text/html” and is this example considered good use?

According to the HTML5 spec for the script tag, it’s totally fine to use <script> with a type attribute set to any valid MIME type. That includes MIME types like text/html or text/plain.

According to the HTML4 spec for the script tag, it’s not quite fine:

“There are two types of scripts authors may attach to an HTML
document: Those that are executed one time when the document is loaded
[and t]hose that are executed every time a specific event occurs”

You don’t need backbone for templating. You can use e.g. jQuery or my personal favorite, Mustache.js.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)