Incidentally, that’s a good illustration why I don’t like w3schools. It completely overlooks a very important aspect: +
is only valid to encode a [space]
in the query part of the URL (the part after the ?
). For the rest of the URL the only valid encoding for a [space]
is %20
(which is also valid for the query part). They should really point this out.
So:
example.com/test.html?foo=bar1+bar2
: The value offoo
isbar1 bar2
([space]
betweenbar1
andbar2
)example.com/test.html?foo=bar1%20bar2
: is identical to the above.example.com/test%20file.html
: Will request the filetest file.html
([space]
betweentest
andfile
)example.com/test+file.html
: Will request the filetest+file.html
(+
betweentest
andfile
)
(It should be noted, though, that +
is perfectly valid for the query part, and Monzo should decode it properly.)