B
B
BonBon Slick2019-08-21 21:31:23
Vue.js
BonBon Slick, 2019-08-21 21:31:23

Static files work only for root url?

For example, the icon goes

<link rel="icon" href="./static/favico/favicon.ico">

When changing the segment, the link from above is assigned to the current YURL, instead of the root folder.
https://toster.ru/question/new/segment/static/favico/favicon.ico

instead
https://toster.ru/static/favico/favicon.ico
of What did you miss?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2019-08-22
@UPSA

"./" - means that to the current folder (/question/new/segment/) add /static/favico/favicon.ico
remove "." and it will be as you want)))
UPD
By default, browsers look at the root of the site and look for favicon.ico.
This is not a mistake .... just why store favicon.ico in other folders ....
Most likely, in vue, you need to “initialize” favicon.ico in some other way, so that it would be thrown into the root.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question