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

Add ic-refresh #205

Closed
nzjrs opened this issue Jun 1, 2017 · 2 comments
Closed

Add ic-refresh #205

nzjrs opened this issue Jun 1, 2017 · 2 comments

Comments

@nzjrs
Copy link

nzjrs commented Jun 1, 2017

I'm currently serving a server generated image from my webapp.

To refresh this image at regular intervals I am setting ic-poll on the parent div, and then returning the complete <img src='/XXX.jpg'> text. This then subsequently causes a request to /XXX.jpg where I can return the newly updated generated image.

This seems a little roundabout. I was wondering if adding something like ic-attr-refresh or ic-src-refresh to intercooler.js made sense. ic-src-refresh for example, would replace or append the src attribute the normal "?timestamp=" + new Date().getTime() trick to entice a refresh.

Hope this makes sense and conceptually is compatible with intercooler's view of the world.

@1cg
Copy link
Contributor

1cg commented Jun 19, 2017

This makes good sense, but I can't come up with a good syntax for it that doesn't get close to what the jQuery would look like. You need to cache bust to make the request work and that makes the syntax difficult.

I like the idea, just don't see how to implement it cleanly yet.

@n3storm
Copy link

n3storm commented Jun 29, 2017

django like queries? ic-poll__src, ic-poll__data-values
this will replace attribute src with ic-get results and will replace attribute data-values from ic-get results

@1cg 1cg closed this as completed May 12, 2020
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

No branches or pull requests

3 participants