Absolute vs relative URLs

后端 未结 12 1377
时光取名叫无心
时光取名叫无心 2020-11-21 05:31

I would like to know the differences between these two types of URLs: relative URLs (for pictures, CSS files, JS files, etc.) and absolute URLs.

In addition, which o

12条回答
  •  执笔经年
    2020-11-21 05:40

    In most instances relative URLs are the way to go, they are portable by nature, which means if you wanted to lift your site and put it someone where else it would work instantly, reducing possibly hours of debugging.

    There is a pretty decent article on absolute vs relative URLs, check it out.

提交回复
热议问题