HTML file saved with includes unexpected CDN JS/CSS references


I am very interested in using inline mode because I should analyze data without Internet connection in my office.

I tested following code at the JupyterLab today,

import numpy as np

import holoviews as hv

import panel as pn
pn.config.notifications = False
pn.config.inline = True = ‘inline’

from bokeh.resources import INLINE

violin = hv.Violin(np.random.randn(100)), filename=‘test.html’, fig=‘html’, resources=INLINE)

and I found out that saved html file include following unexpected CDN JS/CSS references.
As result, the html file is loaded very slowly due to trial and failure for CDN at my office.

          <link rel="stylesheet" href="" type="text/css" />
        <link rel="stylesheet" href="" type="text/css" />
      <script type="text/javascript" src=""></script>

I guess notification area of panel added automatically by holoviews causes this trouble.

Could you suggest any solution or workaround?

Thank you very much for your attention and any advice.

1 Like

Hi @jackey

A work around would be to post-process the file by 1) reading it 2) replacing the unwanted content with the empty string 3) saving again.

1 Like

Thank you very much for your advice.

Actually, I found the below link several minutes ago.
Do not load notyf resources unless notifications are enabled #3958

Previously, I used the 0.13.0 version of panel package, but after I update it to the 0.14.1 version including above pull request, the problem was solved.

1 Like