Skip to main content

No page refresh

Comments

8 comments

  • Adam Helman

    Hi

    I'm in the same boat - did you ever figure it out?

     

    Adam

    0
  • Martin Iv. – vConnect

    Hey, 

    If you think this is necessary, the workaround here will be to add eventListeners to the buttons that execute location.reload() method that reloads the current URL, like the Refresh button.

    Reguards,
    Martin

    0
  • Adam Helman

    Ok - thanks - will look into that.

    0
  • Scott Sibson

    Thank you I'll look into that too.

    0
  • Klaus Krönert

    A Linkt to the solution for other Customers where helpfull or is it Top Secret?

     

    0
  • Keld Jakobsen

    I would also like a real world solution for all browsers.

    I have implementet the script below, but for Safari Browsers it shows the consent dialog on each load 

    <script data-cookieconsent="ignore">
    window.addEventListener('CookiebotOnDialogDisplay', function (e) {
    var cybotCookiebotDialogBodyLevelButtonAccept = document.getElementById('CybotCookiebotDialogBodyLevelButtonAccept');
    if (cybotCookiebotDialogBodyLevelButtonAccept != undefined) {
    cybotCookiebotDialogBodyLevelButtonAccept.addEventListener('click', function (e) {
    if (Cookiebot.consent.marketing) {
    writeTopScroller();
    }
    });
    }
    });
    </script>

    0
  • Klaus Krönert

    On my Script, we will that if *preferences" not set, that the "CookieConset" set zo date 1970 - that works.

    What not is working, is the Reload, if set customer "Marketing" or "Statistic" - Did i make a error in Script?

     
      <script type='text/javascript'>window ['gtag_enable_tcf_support'] = true;</script><script id='Cookiebot' data-culture='DE' src='https://consent.cookiebot.com/uc.js' data-cbid='96fd78a1-1836-4e16-b879-9e4578444ea1' data-framework='IAB' data-blockingmode='auto' type='text/javascript'></script>
       
      <script type='text/javascript'>
       
      window.addEventListener('CookiebotOnDialogInit', function (e) { InitListnerCMP();}, false);
      if (!Cookiebot.consent.preferences)
      {
      document.cookie = 'CookieConsent=;expires=' + new Date(0).toUTCString();
      };
       
      function InitListnerCMP(){
      window.addEventListener('CookiebotOnAccept', function (e) {
      if (Cookiebot.consent.statistics || Cookiebot.consent.marketing)
      {
      document.location.reload();
      };
      }, false);
      }
       
      function CookiebotCallback_OnAccept() {
      Cookiebot.changed &&
      (Cookiebot.consent.statistics || Cookiebot.consent.marketing) &&
      document.location.reload();
      }
       
       
      </script>
    0
  • larryhems

    The History interface allows manipulation of the browser session history , that is the pages visited in the tab or frame that the current page is loaded in.

    There are multiple ways to Refresh/Reload a page with jQuery/JavaScript, some are:

    location.href = location.href
    location.replace(location.pathname)
    window.location = window.location
    window.self.window.self.window.window.location = window.location

     

    0

Please sign in to leave a comment.