Thymeleaf Double Reference to CSS -


in many thymeleaf examples (such a spring boot thymeleaf example, links stylesheets referenced twice in link first reference uses thymeleaf th:ref , second uses standard href:

<link rel="stylesheet"     th:href="@/css/bootstrap.min.css}"     href="../../css/bootstrap.min.css"  /> 

removing href="../../css/bootstrap.min.css" not seem break anything.

is there benefit having double reference or go wrong if second reference removed?

there no need second href explained in documentation:

the th:href tag allowed (optionally) have working static href attribute in our template, our template links remained navigable browser when opened directly prototyping purposes.

so benefit of having static reference have working template , navigable using browser, best case prototyping. if want remove it, nothing goes wrong.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -