Are cuts allowed in fragment or query url?

My understanding of the general form of the URL is as follows:

<scheme>://<host><path>?<query>#<fragment>

Could there be any slashes in the query or snippet? In general, are there any characters that are specifically reserved for any one part of the URL?

+1
source share
3 answers

STD 66 defines a fragment as:

fragment = *( pchar / "/" / "?" )

Therefore, in addition to the characters from the set pchar( unreserved / pct-encoded / sub-delims / ":" / "@"), /they ?can also be used directly in the fragment (i.e., percent coding is not required).

The text /explicitly mentions the text:

( "/" ) ( "?" ) . , , , URI ( 5.1).

+5

.

, #, ( URL-, )

, , , .

. RFC 3987 . " " .

+1

, / fragment, query

:

<a href='#vol/p'>hash example</a>

<div style='min-height:500px;'></div>
<div id='vol/p'>
    <a href='http://jsfiddle.net/echo/jsonp?weep/sho/sdf=help'>get example</a>
</div>

jsfiddle demo

, URL-. moreinfo

0
source

Source: https://habr.com/ru/post/1615185/


All Articles