Datalore 2024.2 Help

Separate domain for HTML output

Datalore Enterprise allows you to use a separate dedicated domain for HTML outputs rendered as iframes in your code cell. The benefits of this feature are:

  • Guarantees security of iframe use in notebooks

  • Improves notebook performance through enabling static cache

Your options

Use our domain

You set up your environment to use our domain, https://*

Use your own domain

You set up your environment to use your own domain. Make sure that the page that will be requested has the proper HTML content. See the details in the procedure below.

Set up a dedicated domain for HTML output

  1. (Skip if using Datalore's domain) Deploy an HTML page with content as in the example below:

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"/> <title>JetBrains Datalore</title> <script> (() => { const urlParams = new URLSearchParams(; const frameId = urlParams.get('frameId'); function initialize() { window.parent.postMessage({ iframeToInitialize: frameId, }, '*'); } window.addEventListener("message", event => { if ("iframeContent" in { const iframe = document.getElementById("content") iframe.setAttribute("srcdoc", } }) window.addEventListener("DOMContentLoaded", () => initialize()); })() </script> <style> body, html { margin: 0; padding: 0; height: 100%; overflow: hidden; } #content { display: block; width: 100%; height: 100%; border: none; } </style> </head> <body> <iframe id="content"></iframe> </body> </html>
  2. Specify the URL of the created page (our Datalore's dedicated domain) using the USER_CONTENT_URL environment variable in your config file.


    services: datalore: ... environment: ... USER_CONTENT_URL: "your_domain_url"


    dataloreEnv: .... USER_CONTENT_URL: "your_domain_url"
Last modified: 29 May 2024