šŸ”— URL Weirdness a URL is a place — and sometimes the place is *inside the URL*

Module 05 taught that a URL locates a resource. These URLs contain their resource, mint themselves at runtime, or launch a game.

1. An image that is its own URL

This invader was never downloaded. Its pixels are base64 in the src attribute — the "file" lives inside this HTML document:

Pixel-art space invader encoded directly in the URL   data:image/svg+xml;base64,PHN2ZyB4bWxucz0i…

2. An entire web page in a link

The href below is a complete HTML document — doctype, styles, content — percent-encoded into a data: URL. No server will be contacted:

Open the page that lives in its own address →

(Opens in a new tab; check the address bar — that IS the page.)

3. Minting URLs at runtime: blob:

JavaScript can create brand-new URLs for data it just made. Click, and this page will generate a text file in memory, give it a URL, and offer it for download:

4. A custom protocol that launches WEB WARS

Sites can register as handlers for web+something:// links. Step 1 asks the browser's permission; step 2 fires the protocol:

  2. web+wars://engage šŸš€

Support: Chromium & Firefox. The scheme must start with web+ — the platform guards its own protocol namespace.

5. Deep-link to a phrase on any page text fragments

Add #:~:text=… to a URL and the browser scrolls to that exact phrase and highlights it — on pages that never defined an anchor there. Zero code on either end:

Jump into Just HTML, straight to a highlighted sentence →

This is how "copy link to highlight" in your browser's right-click menu works.

6. Bookmarklets: the one honest javascript: URL

Module 05 said never put javascript: in an href — with one historic exception: bookmarklets, tiny programs stored as bookmarks that run on whatever page you're viewing. Drag this button to your bookmarks bar, then click it on any website:

🚧 GeoCities-ify any page

Johnny from HTML Oldskool considers this a restoration, not vandalism. Reload the victim page to undo.