title: Go back with javascript after javaforward (cookiewall)
body: <p>I'm have run into a problem while creating a cookiewall.</p>
  
  <p>I'm using a csm (weebly) which does not allow me to edit the php so im building a cookiewall with java ( I know it’s not perfect but its gonna have to do for now, since im no great coder and I know no other way to do this)  </p>
  
  <p>My wall works as following:
  A piece of code checks for my ‘’cookieaccepted’’ cookie when loading any of my pages if the cookie isn’t found the user will be redirected to a page (javascript forward) without any cookies or other trackers where the user needs to click a button to accept all cookies to proceed. By clicking the ‘’cookiesaccepted’’ cookie is set and the user is send back to the previous page. </p>
  
  <p>Only my button is not working it’s sending my users back two pages, it’s like it has forgotten the page where the user was forwarded from?? Is there a way to fix this?
  This is my button code: </p>
  
  <pre><code>&lt;a class="wsite-button wsite-button-large wsite-button-normal" onclick="document.cookie=&amp;quot;CookieAccepted=CookieAkkoord;expires=Wed, 18 Dec 2023 12:00:00 GMT&amp;quot;" href="javascript: history.back()")"&gt;
  &lt;span class="wsite-button-inner"&gt;Ja, ik accepteer cookies&lt;/span&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>Thanx in advance</p>