Referer

Referrer's Description

While application start option referrer will be transferred. In this option you can set what URL to use after exit application.

For correct return from page transition to application should be made, is necessary to use parameter referrer.

While loading application in GET, referrer is automaticly added (it will contain urlencoded address that will be used on exit from application. )

For using referrer there is a need to decode it in first place (function decodeURIComponent)

Application start:

http://example.com/example-app/?referrer=http%3A%2F%2Fexample2.com.ua%2Finet-services%2Ftest_html%2F%3Flanguage%3Dru

Decoded referrer in this example is http://example2.com.ua/inet-services/test_html/?language=ru

Method of getting GET parametrs:

var _GET = (function(){ var url = window.location.href; var x = url.indexOf('?'); var get = {}; if (x!=-1){ var l = url.length; url= url.substr(x+1, l-x); l = url.split('&'); x = 0; for(var i in l){ if (l.hasOwnProperty(i)){ url= l[i].split('='); get[url[0]] = decodeURIComponent(url[1]); x++; } } } return get; })();