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
Don't load stratopan dependency graphs in the background #1179
Comments
I think I can partially mitigate the problem by adding a few cache-control headers. But it is nice that the graphs appear instantly. And my server hasn't fallen over yet. So I suggest leaving this issue open, but putting it on the back burner for now. |
I think graph widget data should only be loaded when the user asks for it (when Dependency graph is clicked). We can do it by listening to click event and making an ajax call. Does this approach look good? |
Since the content is in an iframe, I don't think AJAX is the answer. Instead, I think we would use the click event to inject the iframe into the DOM, and then the browser will do the rest. At least, that's my theory. Since we are using Bootstrap, we may be able to hook into events on the modal rather than resorting to raw Javascript event binding. See "Events" here: http://getbootstrap.com/javascript/#modals-usage |
When the modal is shown, then we set the "src" attribute of the iframe, which causes the browser to load the content. We only do this the first time the modal is shown, because the src will be the same for any given page. Fixes GH metacpan#1179.
When the modal is shown, then we set the "src" attribute of the iframe, which causes the browser to load the content. We only do this the first time the modal is shown, because the src will be the same for any given page. Fixes GH metacpan#1179.
When the modal is shown, then we set the "src" attribute of the iframe, which causes the browser to load the content. We only do this the first time the modal is shown, because the src will be the same for any given page. Fixes GH metacpan#1179.
According to @thaljef, there's a request for the graph on every page view that includes it, regardless of whether the modal is ever opened.
The text was updated successfully, but these errors were encountered: