What is the difference between decodeURIComponent() and decodeURI()?
To explain the difference between these two let me explain the difference between encodeURI and encodeURIComponent.
The main difference is that:
Now back to the difference between the decode functions, each function decodes strings generated by its corresponding encode counterpart taking care of the semantics of the special characters and their handling.
@reference_1
@reference_2
@reference_3
The main difference is that:
- encodeURI is intended for use on the full URI.
- encodeURIComponent is intended to be used on .. well .. URI components that is any part that lies between separators (; / ? : @ & = + $ , #).
Now back to the difference between the decode functions, each function decodes strings generated by its corresponding encode counterpart taking care of the semantics of the special characters and their handling.
@reference_1
@reference_2
@reference_3
No comments:
Post a Comment