In JavaScript, what is the difference between these?
escape() / unescape()encodeuri() / decodeuri()>
First of all - Escape is deprecated and shouldn't be used.
encodeURI()
You should use this when you want to encode a URL, it encodes symbols that is not allowed in a URL.
encodeURIComponent()
Should be used when you want to encode parameters of your URL, You can also use this to encode a whole URL. But you would have to decode it in order to use it again.
--
I'd say this a duplicate. Here's a good answer on SO - Credits goes to Arne Evertsson: When are you supposed to use escape instead of encodeURI / encodeURIComponent?
There's a lot of details on why/why not on that topic.