I would like to have a confirmation on some point.
My goal is to always get the same string (which is the URI in my case) while reading the href property from a link
You could recompose the full url using a bit of javascript :
function parseLink(link) {
var baseUrl = location.href.substring(0,location.href.lastIndexOf('/'));
if (link.indexOf('/') != -1) {
link = link.substring(link.lastIndexOf('/'));
} else {
link = "/"+ link;
}
var fullUrl = baseUrl + link;
return fullUrl
}