Hi, does anyone know how to clear iframe cache in Obsidian?
Since Obsidian 0.9.6, some functions of Excalidraw.com can’t be used because of this :
image

Then, I set sandbox="allow-modals" but still got the same error result. Here is iframe code that I use :

<iframe src="https://excalidraw.com/" style="position:absolute; top:0; left:0; width:100%; border:none;  height:100%;" sandbox="allow-modals"></iframe>

I think the error is because Obsidian cache is not refreshed. Or is there something else that I miss?

Hm. Not sure, though there’s gotta be a way. I imagine a folder or file in the hidden .obsidian directory in your vault contains cache information like this. Alternatively, it looks like you can wipe it via Developer Tools:

I tried what you shared:

when you are developing, in developer tools go to the tab application and in clear storage and clear site data

And also this one:

The Electron stores it’s cache in these folders:

Windows:
C:\Users<user>\AppData\Roaming<yourAppName>\Cache

Linux:
/home//.config//Cache

OS X:
/Users//Library/Application Support//Cache

So deleting these folders can also help you. Of course this is one time solution :wink:

but still got the same error. Also tried to reinstall Obsidian (with clean uninstalling), still got the same error.

Then I tried with another laptop (Obsidian was fresh installed). But got the same error. So, I think it’s nothing to do with iframe cache.

Anyway thank you for the help!


If someone want to repro the error, here are the steps:

  1. Embed Excalidraw iframe with this code
    <iframe src="https://excalidraw.com/" style="position:absolute; top:0; left:0; width:100%; border:none; height:100%;" sandbox="allow-modals"></iframe>
  2. in Excalidraw, try to press trash (reset the canvas) button.
    image

The expected result is this window will pop-up. It worked when 0.9.4.
image

The actual result in 0.9.6 is nothing happen, and check the console then you will find this error.
image

Hm. Let’s convert this to a bug report. Can you reproduce this without any plugins enabled and without custom CSS? (just to be sure.)

What OS are you using?

Yes, I can.

OS : Windows 10 Pro, version 1903
Obsidian : 0.9.6
Custom CSS : no

1 Like

This is fixed, thank you for your help (and thank you devs for the update)!

1 Like

Is this the right way to clear the cache?

rm "$HOME/Library/Application Support/obsidian/Cache"