What is this script tag?

html, javascript, jquery

Solution

This is something from a templating engine, such as Smarty or similar.

Everything between the brackets `{{` `}}` is handled server-side, likely so that the script files can be minified server-side easily and the file name be updated to the minified version, or something from a variable.

Problem

I've never seen it used like this before: ``` <script src="{{ file.name_js }}"></script> ``` Is this better?

Original source