Using CDNs for Script Loading
Our sample projects and report templates can help you learn the basics of working with our products.The Reports.JS scripts can be loaded from a CDN instead of being hosted with your application, which speeds delivery and simplifies updates.
Reference the scripts from a CDN.
How it works. The browser fetches the library from the CDN's edge cache, offloading delivery and keeping the scripts up to date with the published package.
Reference the scripts from a CDN.
<script src="https://cdn.jsdelivr.net/npm/stimulsoft-reports-js/Scripts/stimulsoft.reports.js"></script>
<script src="https://cdn.jsdelivr.net/npm/stimulsoft-reports-js/Scripts/stimulsoft.designer.js"></script>
<script src="https://cdn.jsdelivr.net/npm/stimulsoft-reports-js/Scripts/stimulsoft.viewer.js"></script>Use them as usual once loaded.var report = new Stimulsoft.Report.StiReport();
report.loadFile('../reports/SimpleList.mrt');
var designer = new Stimulsoft.Designer.StiDesigner();
designer.renderHtml('content');
designer.report = report;- The
jsDelivrURLs serve the same modules you would host locally, versioned through the npm package. - The API is identical to a local install — only the
<script>source changes.
How it works. The browser fetches the library from the CDN's edge cache, offloading delivery and keeping the scripts up to date with the published package.