-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Modified image not updated in preview #746
Comments
I looked into this a bit. Haven't gotten it to work. What I've tried is:
Haven't worked much with WebKit's |
This is a pretty long-standing issue, and I think there is actually a duplicate somewhere. I also tried the second method a while ago (and it didn’t work, obviously). I’m thinking maybe the best way around this is to implement some kind of cache busting logic in the Markdown renderer. |
Good idea. But I think it won't work for local files? Gave it a shot anyway. I tried adding a per request unique GET parameter value for images in the I then tried something really nasty just to see if it'd work. I prepended an incremental number of |
Paths are probably manipulated internally. This has been a problem with PDF exports—Safari would export files with absolute URLs, breaking links. I would have thought GET parameters would work… but maybe it just treats the |
One thing I’m curious about: Would the “new” WebKit API (classes with |
Ah perhaps. That'd be a nice way to solve the issue. Would it be a good idea to use it for now and then look into moving over to |
|
Fix MacDownApp#746 image cache issue
@niklasberglund FYI I’m planning to migrate to WKWebView in #1181. |
Would be nice if the image could be automatically updated when coming back to MacDown. But the issue I observed is that even by:
Expecting step 5 to trigger a reload of the image but the image is using a cached version so it's still not updated. Sometimes it will be updated after removing and inserting again, sometimes not.
⌘R
reloading the preview also doesn't help.I'm thinking it's because of caching in the
WebView
The text was updated successfully, but these errors were encountered: