It is better? +6 javascript jquery ...">

What is this script tag?

I had never seen it used like this:

<script src="{{ file.name_js }}"></script> 

It is better?

+6
source share
3 answers

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

Everything between the brackets {{ }} processed on the server side, it is likely that the script files can be easily minimized on the server side and the file name has been updated to a mini version or something from a variable.

+8
source

Looks like somekind template language . For example, Django has the same tags.

+1
source

It seems to me that in some form of parsing a template in which something inside {{ }} will be replaced with a specific value on the server side.

0
source

Source: https://habr.com/ru/post/920530/


All Articles