Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

previewed images are cached and only updated if atom is restarted #49

Closed
oli-obk opened this issue Aug 4, 2015 · 4 comments
Closed
Assignees
Milestone

Comments

@oli-obk
Copy link

oli-obk commented Aug 4, 2015

deleting or modifying images has no effect on whether they are rendered in the preview-tab.

closing and opening the preview tab has no effect. Atom needs to be restarted in order to refresh the images.

@leipert
Copy link
Contributor

leipert commented Aug 4, 2015

Made some tests. It seems like atom caches it itself.
I found a solution that reloads local files on each render, but that seems just plain wrong.
I will work on a solution that will work with changing local files.

@leipert leipert self-assigned this Aug 4, 2015
@leipert leipert added this to the 1.7.0 milestone Aug 4, 2015
@Galadirith Galadirith mentioned this issue Aug 4, 2015
8 tasks
Galadirith added a commit that referenced this issue Aug 5, 2015
@Galadirith
Copy link
Collaborator

There is atom/markdown-preview#207 that also records this issue. I've mocked up a candidate fix in #53 that exploits the # fragment identifier. Let me know your thoughts @leipert and I'm very happy if you want to reassign this to me :D

@leipert leipert assigned Galadirith and unassigned leipert Aug 5, 2015
@leipert
Copy link
Contributor

leipert commented Aug 5, 2015

I wanted to basically do the same thing with the query parameter ?. My hack was:

src = src.concat "?v=#{Math.random()}"

@Galadirith
Copy link
Collaborator

Ah very kl, much more succinct. The issue I see with that is that that will force all images to refresh every time you re-render the preview, and with an image heavy source document you might end up with a lot of images not loading with the initial re-render and then popping in changing the length of the preview.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants