Names for types of URLs

后端 未结 5 604
悲&欢浪女
悲&欢浪女 2020-12-29 05:23
  1. Absolute
    http://www.example.com/images/icons.png

  2. Relative
    ../images/icons.png

5条回答
  •  爱一瞬间的悲伤
    2020-12-29 05:43

    number 3 is also considered relative. number 4 is absolute, but lacks the protocol. This is useful, if you want to be able to access the same URL using HTTP and HTTPS.

    Absolute URLs specify the location of a Web page in full, and work identically no matter where in the world you are.

    Relative URLs are context-sensitive, giving a path with respect to your current location.

提交回复
热议问题