mattiasw / self-contained

Self-contained web page data URI generator.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Self-contained web page data URI generator

Create a web page contained inside a link that can be sent to others. No hosting needed.

Try it out: https://mattiasw.github.io/self-contained/

How does it work?

In addition to regular URLs like http://example.com, web browsers can also use something called a data URI. A data URI looks like this:

data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7

That is a transparent GIF image. The most common uses of data URIs are probably images or as a way to encode files for client-side-only use.

But there is nothing stopping us from putting a whole web page in that link. We just need to make sure we don't reference any local files. External files are okay though which makes it possible to still create pretty advanced pages.

About

Self-contained web page data URI generator.

License:GNU Affero General Public License v3.0


Languages

Language:HTML 41.3%Language:JavaScript 37.6%Language:CSS 21.1%