How do you force a joplin cache refresh?

Operating system

Linux

Joplin version

2.13.15

Desktop version info

Joplin 2.13.15 (prod, linux)

Client ID: 9959465eea794e60b1b95760c308ca91
Sync Version: 3
Profile Version: 44
Keychain Supported: No

Revision: 7d2c1c0

Combine notes: 1.2.2
Conflict Resolution: 1.2.3
Favorites: 1.3.2
Folding in Code Mirror Editor: 2.0.1
Inline tags: 1.2.1
Inline TODO: 1.7.0
Note overview: 1.7.1
Note Rename: 1.0.0
Note Tabs: 1.4.0
Quick Links: 1.2.4
Simple Backup: 1.3.6
Space Indenter: 0.2.2
Templates: 2.4.0

Editor

Markdown Editor

What issue do you have?

I regularly import CSS from a server online into a note. …

<style>
    @import "https://someserver/somestylesheet.css";
</style>

Problem: when that stylesheet changes, Joplin doesn't refresh it. It's cached … somewhere. Joplin eventually does a refresh via some calculus I don't understand and can't see the pattern for, but, for example, the Joplin on my laptop has been open overnight, and the CSS being pulled in is still a version behind the current remote CSS stylesheet.

CAVEAT (this is an update): If you point at the filesystem (@import "/home/todd/some.css";) Joplin does not cache this. Joplin caches CSS pulled in from the internet not the filesystem.

What is the equivalent of CTRL-SHIFT-R for Joplin? And if that doesn't exist, is there another way to force Joplin to re-pull stuff like that?

And yes, I know I leverage some of the more edge-case features of Joplin, but this one feature makes Joplin hugely powerful for me.

Thanks again.

-t

Does adding a query to the end of the URL help? For example:

<style>
    @import "https://someserver/somestylesheet.css?refresh=1";
</style>

then, to refresh again,

<style>
    @import "https://someserver/somestylesheet.css?refresh=2";
</style>
1 Like

SHAZAM! Why did I not think of that? It does work. That being said, if there is an app-level solution, I would love to know about it.

UPDATE: this solves the problem only some of the time.

Sadly, this only works for the CSS you call. The CSS that is called by the CSS you called (an @import in that CSS and down the line), does not get updated. It is stuck in the cache. And so, if something has been fixed down the chain of CSS … too bad.

I REALLY want a method to refresh Joplin's cache. This is ridiculous.

Oi.

Does checking "disable cache" in Joplin's development tools help?

Yes. But only when you have Development Tools enabled. :slight_smile: I.e., no. :frowning:

Hi,

you could force Joplin to refresh using 2 stylesheets alternatively.
Comment and uncomment to disable the line.
Try

<style>
	/*@import "/home/user/for_joplin/styles/mainstyles.css";*/
	@import "/home/user/for_joplin/styles/no_style.css";
</style>

CSS pulled in from the filesystem is not cached by Joplin and therefore is not an issue. I have updated my original posting to reflect this nuance. It's a nagging issue with CSS pulled in from the internet (see example in my original posting).