The escape() function encodes a string. it makes a string portable, so it can be transmitted across any network to any computer that supports ASCII characters.
The escape() function encodes special characters, with the exception of: * @ - _ + . /
The encodeURI() function is used to encode a URI. This function encodes special characters, except: , / ? : @ & = + $ # (Use encodeURIComponent() to encode these characters).
The encodeURIComponent() function encodes a URI component.This function encodes special characters. In addition, it encodes the following characters: , / ? : @ & = + $ #