Chat Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
April 21, 2026 - @398.28 (what is this?)
Activity rating: Three Stars Posts & Arts: 25/1k.beats Random | Recent Posts | Guild Recents
News: ozwomp is requesting your location :ozwomp: [Agree] Guild Events: There are no events!

+  MelonLand Forum
|-+  Life & The Web
| |-+  ✁ ∙ Web Crafting
| | |-+  The Page With No Code


« previous next »
Pages: [1] Print
Author Topic: The Page With No Code  (Read 120 times)
Dan Q
Hero Member ⚓︎
*****
View Profile WWWArt


I have no idea what I am doing
⛺︎ My Room
RSS: RSS

Guild Memberships:
« on: April 17, 2026 @845.15 »

I accidentally came across a stupid experiment I did back in 2023. It's called The Page With No Code.

It's a Web page that looks like this:



But if you "View Source", it has no code whatsoever. Whaaa?


Sadly nowadays it only works in Firefox.

The "black magic" it uses is as follows:


  • Your browser gets a blank page, which it assumes is a typo so it treats it as if it says <html><head></head><body></body></html>
  • The server sends a Link: header which delivers (or references, now, to work around a different bug that turned up one day) some CSS.
  • That CSS uses ::before, ::after, and content: '...' to "fake" the content!

Anyway: I enjoyed re-discovering this stupid experiment and thought you might enjoy it too. I wrote more about it here.
Logged


Artifact Swap: I met Dan Q on Melonland!PolyamorousBouncy Egg!Joined 2025!Lurby
lakes
Sr. Member ⚓︎
****
View Profile WWW


⛺︎ My Room
Matrix: Chat!
XMPP: Chat!

Guild Memberships:
Artifacts:
Joined 2025!
« Reply #1 on: April 17, 2026 @854.77 »

The page doesn't look how I thought it would.
I thought it'd look like those "black text on white" minimal websites you'd sometimes see either on the indie web now or in the 90s.
Logged




virtualpet2001
Full Member ⚓︎
***
View Profile WWWArt


getting hard to be someone but it all works out
⛺︎ My Room

Guild Memberships:
Artifacts:
Joined 2026!Water Creature
« Reply #2 on: April 18, 2026 @847.22 »

This is fun, I figured out it was css but i didn't know that the server could hand it to you without it being specified in the html itself
out of curiosity, what part of the equation makes this only work in firefox? does "now" imply that it worked in more browsers when you first made it???
Logged


Dan Q
Hero Member ⚓︎
*****
View Profile WWWArt


I have no idea what I am doing
⛺︎ My Room
RSS: RSS

Guild Memberships:
« Reply #3 on: April 18, 2026 @909.07 »

what part of the equation makes this only work in firefox? does "now" imply that it worked in more browsers when you first made it???

To deliver the CSS without having a <link> or <style> tag (which would require HTML code!), I use a Link: HTTP header. In the initial version, I just sent Link: <data:...>; rel="stylesheet", containing a Base64-encoded copy of the CSS, but I had to change it a few years later when I switched webserver software and my new webserver software couldn't cope with headers that long! So now it passes a URL to a CSS file in the Link: header instead.

But specifying CSS using a Link: header wasn't ever widely supported. Firefox and its derivatives is the only mainstream browser left that does so (though I think pre-Blink Opera could do it too). I was so excited when I thought of it, because there are all kinds of interesting things you could do with Link:-based CSS, but sadly it looks like Chromium-based browsers aren't ever going to support it anyway.
Logged


Artifact Swap: I met Dan Q on Melonland!PolyamorousBouncy Egg!Joined 2025!Lurby
Pages: [1] Print 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | ~ Send Feedback ~ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi

MelonLand Nav

@000

Want to Login or Join ?

Minecraft: Online
Join: craft.melonking.net