Skip to content
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

Closed
oalders opened this issue May 14, 2014 · 3 comments
Closed

Don't load stratopan dependency graphs in the background #1179

oalders opened this issue May 14, 2014 · 3 comments

Comments

@oalders
Copy link
Member

oalders commented May 14, 2014

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.

@thaljef
Copy link
Contributor

thaljef commented May 14, 2014

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.

@chankeypathak
Copy link
Contributor

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?

@thaljef
Copy link
Contributor

thaljef commented May 17, 2014

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

thaljef added a commit to Stratopan/metacpan-web that referenced this issue May 17, 2014
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.
@oalders oalders closed this as completed May 26, 2014
oiami pushed a commit to oiami/metacpan-web that referenced this issue Jun 9, 2014
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.
oiami pushed a commit to oiami/metacpan-web that referenced this issue Jun 9, 2014
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants