Referrer
While an application starts, a referrer option will be transferred. In this option, you can set which URL to use after exiting the application.
To correct return from page transition to application it is necessary to use the referrer parameter.
While loading an application in GET, the referrer is automatically added (it will contain an encoded URL address that will be used on exit from the application).
To use referrer it has to be decoded first (function decodeURIComponent).
Application start:
http://example.com/example-app/?referrer=http%3A%2F%2Fexample2.com%2Finet-services%2Ftest_html%2F%3Flanguage%3Dru
Decoded referer in this example is http://example2.com/inet-services/test_html/?language=ru
The 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; })();