Enable or disable browser cache for data

Options

by Flexmonster Pivot Table

HTML

<script src="https://cdn.flexmonster.com/flexmonster.js"></script>

<p>
  Check the <b>Network</b> tab of the Developer Tools window to see the changes
  in the name of the loaded <code>data.csv</code> file.
</p>

<button onclick="createPivot(true)">Load file with cache enabled</button>

<button onclick="createPivot(false)">Load file with cache disabled</button>

<div id="pivot-container"></div>

CSS

@import url(https://cdn.flexmonster.com/assets/jsfiddle-styles.css);

JavaScript

let pivot;

function createPivot(allowBrowsersCache) {
  if (pivot) {
    pivot.dispose();
  }
  pivot = new Flexmonster({
    container: "pivot-container",
    componentFolder: "https://cdn.flexmonster.com/",
    report: {
      dataSource: {
        filename: "data/data.csv"
      },
      options: {
        allowBrowsersCache: allowBrowsersCache
      }
    }
  });
}

createPivot(true);