What does dollar sign $ do in url?

前端 未结 2 1006
难免孤独
难免孤独 2021-02-01 03:56

I have been reading that $ ! ; . , are \'reserved\' chars in url. But I can not find what are they reserved for.

/ path delimiter  
: port
? query         


        
2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-01 04:24

    RFC 2396 is obsolete.

    For modern versions of the spec, see:

    • RFC3987 (in relation to IRI's); and
    • RFC3986 (in relation to URI's).

    About /

    Yes, that is used as a delimiter in the path part.

    About :

    Ye, it is used as a prefix for port, but it has other roles such as the user info separator, and a delimiter for IP styles of host specifiers.

    About =

    Suprisingly, the = character is not part of the general URL, URI nor IRI syntax. It has a special meaning only the the http(s) protocols. This is not intrinsic to URL/IRI/URI

    About +

    The role of + as a substitute for space is NOT part of the URL/URI/IRI syntax. It is merely a convenient invention of some PHP programs for pretty URL purposes.

    About $ and ;

    These have no special meaning in the URL/URI/IRI syntax. They can be part of the sub-delimiters production, which can be used in the user info part, future-IP part, path segment or a host part.

提交回复
热议问题