In a URL, should I encode the spaces using %20
or +
? For example, in the following example, which one is correct?
www.mydomain.com?type=xbox%20360
www.mydomain.com?type=xbox+360
Our company is leaning to the former, but using the Java method URLEncoder.encode(String, String)
with "xbox 360"
(and "UTF-8"
) returns the latter.
So, what's the difference?