Iframe.diy – "iframe server" static site

2 pointsposted 10 hours ago
by alexgleason

1 Comments

alexgleason

10 hours ago

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.