New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Safari not caching large Javascript resources #5558
Comments
So Chrome does cache things? |
(Just to make sure: you're sure that you have caching enabled when dev tools is open in Safari?) |
Ya, I'm sure the cache is enabled. If you reload from the same tab, then I
observe the same thing you do. But if I close the Safari window, open a new
one, and then load the notebook from that new window, it isn't cached. Are
you seeing something different?
…On Mon, Nov 12, 2018 at 9:04 PM Jason Grout ***@***.***> wrote:
I just checked, and it works for me. I have to make sure the cache is
enabled, though:
[image: screen shot 2018-11-12 at 5 13 09 pm]
<https://user-images.githubusercontent.com/192614/48384236-529c5b00-e69e-11e8-8afe-6b3878c9fc9b.png>
(enable the cache by clicking on the second-to-last icon on the far right,
that looks like a cylinder with a line through it, until it is not blue,
and the tooltip reads "Ignore the resource cache when loading files")
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5558 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA8Svcmhne4SJqsdAu8HgaJETjUcjvd_ks5uuh0TgaJpZM4YEeN0>
.
|
And ya, chrome devtools confirms that chrome is caching the javascript bundles, even if you close the Chrome frame and open a new one. |
I think that the problem its not the caching. The problem its de large javascript file. The navigator cut the petition sometimes and when you try reload if you are lucky the jupyter works. |
I'm having the same problem with JupyterLab 1.0 and Firefox. |
@jasongrout I can confirm that it is not cached in firefox, but in chrome for jupyterlab 1.0.4 |
I notice your vendors js file hash is different than mine. Is it a fresh install of jlab 1.0.4 with no extensions? |
Note that Essentially, |
Thanks for the explanation. i have found the problem. the deprecated plotly extension https://github.com/jupyterlab/jupyter-renderers/tree/master/packages/plotly-extension prevents caching and adds almost 20 Megabyte. I uninstalled it and caching is working. I installed plotly-jupyterlab and the caching is again not working and the javascript bundle is increased by 20 Megabytes. At the moment i only have the following extensions installed jupyterlab-plotly if i just have @jupyter-widgets/jupyterlab-manager caching works, so there might be something wrong with the official plotly extension |
@jasongrout @flixr i have solved the problem. It is just firefox caching settings. By default it does not cache files over 51200 KB or 51,2 Megabyte! I changed it to 128 MB and now everything is working fine. I am also trying --dev-build=False since it seems to significantly slim down javascript. |
@juliusvonkohout 👍 that was it |
i think that it's not a good solution. In a platform with hundred users ..... all user must be configure the navigator? |
@flixr @jasongrout the solution is to use --dev-build=False everytime you install something. the javascript went down from 55 to 8 Megabyte. The developers should make this default... |
Fixing this I think is #6907 - just merged into master. |
Thanks, that explains why it was different for me, as I was using stock JLab without extensions. |
Can people here try the new alpha just released on pypi (not available on conda-forge):
This includes some recent changes to build a smaller js bundle by default. |
Awesome work by the way, really like the lab UX. Any way to reduce the size of the vendors-main with some kind of minify? |
FYI, minification is turned on by default in the latest release of jlab. |
Closing as resolved. Please post a comment if this is still an issue. |
Describe the bug
Desktop Safari is not caching
vendors*.js
, resulting in ~15 MB downloads every time a remote Jupyter session is navigated to.To Reproduce
This isn't a big deal if the server is local, but for a remote server, this means the 14.77 MB "lab/static/vendors~main.c2e649db00cf6963e74a.js" is being re-downloaded every time jupyterlab is navigated to.
Although note that in Safari, if you reload the same frame that is displaying a notebook, then the resources IS cached and loaded from memory. So the problem is that for some reason, the javascript resources aren't being cached to disk that is shared across Safari windows. I've confirmed that Safari is caching to disk resources from other websites, so this is not a general failure of Safari to cache.
Expected behavior
Safari caches static resources, as Chrome does.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: