Skip navigation

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;

})();
Need Help

Dave is an expert on the MAG STB and the author of this article.

Was this article helpful?

Yes No

Sorry to hear that.
How can we improve this article?

We use cookies in order to optimise our website, provide you with the best possible user experience and help us promote our products. Please read our Cookie Policy to find out how we use cookies and how you can control cookies.
By using this website or closing this message, you acknowledge our Privacy Policy and agree to our use of cookies as described in our Cookie Policy.