Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a query string character whose meaning is "ignore the string beyond this point"?

Is there a reserved query-string character that is conventionally used to ignore sections of the string? Something like this:

?foo=bar&baz=quux*some character*&sky=blue

Where adding some character results in this query string with the end ignored:

?foo=bar&baz=quux

I know that it's usually up to the programs parsing the query string to decide how anything is handled, but I wanted to know if anything like this exists in the same way that a + is meant to denote a space.

like image 498
hlh Avatar asked Jan 13 '23 23:01

hlh


1 Answers

The fragment identifier, indicated by #, has such an effect:

The query component is indicated by the first question mark ("?") character and terminated by a number sign ("#") character or by the end of the URI.

like image 89
Gumbo Avatar answered Jan 17 '23 16:01

Gumbo