Settings

Theme

Iframe.diy – "iframe server" static site

iframe.diy

2 points by alexgleason · 1 comment

Reader

1 thread
alexgleasonOP

This is a web trick that lets you safely embed arbitrary html. It involves serving the same static site from all subdomains *.example.com and communicating with the host over postMessage. This allows the host to render previews using root-relative paths (vite builds) so it could function as a local devserver for an IDE. It could also be used to embed mini-apps submitted by users in chats and social feeds.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection