Embed not refreshing?


I’m having an issue with embedding with the “Runtime with JavaScript” option.

Here is what I tried:

I published a test page (all the cells), and then listed that page, and then clicked embed, and copied the Runtime with Javascript code. I could see the contents show up in 3 different places. 1: Squarespace Website; 2: Codepen Sketch; 3: local website running a node server. That part is good.

However, if I update the Observable page, the embeds do not update to the latest published version.
What I expect to see the latest version of the Observable page after updating it and waiting the 30s.

A documentation page states:

“By default, the embed code loads the latest published version of the notebook. When you publish a new version of the notebook on Observable, your embedded cells will update immediately (or at least, within 30 seconds).”

Am I just missing something simple? I copied the provided code verbatim.

Thanks in advance!

No sooner than I posted this question, things started working for me! I’m new to the platform so I’m not sure what the difference was. I didn’t make any changes, so maybe the cache was stuck? I’ll post back if I learn anything.

I have a similar problem. Some of my notebooks are updated automatically and some not (and I have to re-embed)

Perhaps, you’re embedding the version pinned code that’s generated by default? For example, here’s an oEmbed link (which, sadly doesn’t include the necessary preview headers):


Note the @58 - that means that the embed will refer to that version of the notebook. Simply remove it, if you’d like the embed to update automatically when you edit the notebook. Of course, that comes with its own hazards. You might look into the Pause Live Edits feature, if you do this.

The Javascript embed code is more complicated but you can find the version pin in this line of code there:

import define from "https://api.observablehq.com/d/eee96bf4dd9ffa95@58.js?v=3";
1 Like

Many thanks!