1.

Which function is used in JavaScript for URL encoding?(a) encodeURI()(b) Server.URLEncode()(c) rawurlencode()(d) UREncodingI got this question during a job interview.Asked question is from URL Encoding topic in division HTML Images & Web Page Files of HTML

Answer» CORRECT choice is (a) encodeURI()

Easy explanation: There are some built in functions in JavaScript, ASP and PHP for URL encoding. JavaScript USE encodeURI() function. ASP USES Server.URLEncode() function, rawurlencode() function is used by PHP. Space is encoded as %20 by JavaScript function.


Discussion

No Comment Found

Related InterviewSolutions