top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between encodeRedirectUrl and encodeURL?

+1 vote
728 views
What is the difference between encodeRedirectUrl and encodeURL?
posted Oct 22, 2015 by Shyam

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

encodeURL and encodeRedirectURL are methods of the HttpResponse object. Both rewrite a raw URL to include session data if necessary. (If cookies are on, both are no-ops.)

encodeURL is for normal links inside your HTML pages.
encodeRedirectURL is for a link you're passing to response.sendRedirect(). It has slightly different syntax requirements

answer Oct 23, 2015 by Karthick.c
...