What Is URL Encoding? Why Encode Chinese?
Why non-ASCII and reserved characters become %XX in URLs.
URLs only safely allow a limited character set; Chinese, spaces and &/= often need encoding.
encodeURIComponent encodes most special characters — best for query values.
encodeURI keeps URL structure characters like :/?&# — better for full links.
Encoding runs locally; nothing is uploaded.