I've come across whenever you go to a profile on Facebook and then click link provided in

Contact Details --> Website

Facebook first get you to url format pointed out below

http://world wide web.facebook.com/l.php?u=http%3A%2F%2Fwww.nwaonfire.com%2F&h=BAQByDCFo

after which goes towards the site .

My real question is why facebook achieves this, Iam asking because there's a location during my application where iam permitting customers to go in website web addresses.

URL encoding is performed to ensure that another URL can be put inside the first's query string having to break the initial URL. For instance, implying directory structure using the "/" character or breaking from title value pair by utilizing "&lifier". If you are likely to be embedding a URL like a query string parameter, you have to scribe it first. The way you do that will differ with respect to the language you are dealing with but many internet based frameworks possess a native or library based function to simply do that.