title: Problems is document.referrer not working
body: <p>I am currently loading web views using <code>HTML</code> file. And web functions are handled in <code>js</code> file. This is not a problem. </p>
  
  <p>But my problem is the backButton. I check if there is a page to go back to. So we used <code>document.referrer</code> to show webviews using existing servers. </p>
  
  <p>But it doesn't work because it's used inside iOS while creating the iOS <code>hybridApp</code>.</p>
  
  <p>So I checked if the <code>history.back()</code> worked. It works. There's a page to go back to.</p>
  
  <p>There are pages that need to be returned, but <code>document.referrer</code> not work.</p>
  
  <h2>Move from main page to detail page in html include js file</h2>
  
  <pre class="lang-js prettyprint-override"><code>location.href = './Detail.html'
  </code></pre>
  
  <h2>Back button function in the header of <code>Common.js</code> file</h2>
  
  <pre class="lang-js prettyprint-override"><code>    alert(document.referrer) // return empty
      if (document.referrer) {
        history.back();
      } else {
        location.href = "./Main.html"; // only can do
      }
  </code></pre>
  
  <h2>The two html files(Main,Detail) use a common header. The function is in the <code>Common.js</code> file. And I'm using Swift5</h2>
  
  <h2>Main.html</h2>
  
  <pre class="lang-html prettyprint-override"><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover, shrink-to-fit=no"&gt;
  &lt;meta name="referrer" content="always"&gt;
  </code></pre>
  
  <h2>Detail.html</h2>
  
  <pre class="lang-html prettyprint-override"><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover, shrink-to-fit=no"&gt;
  &lt;meta name="apple-mobile-web-app-capable" content="yes"&gt;
  &lt;meta name="referrer" content="always"&gt;
  </code></pre>
  
  <p>How can we solve this problem?</p>
  
  <p>Thanks in advance.</p>