Google Blogoscoped

Forum

HTML Mystery

Cow [PersonRank 2]

Friday, October 21, 2005
15 years ago

I made this yesterday and I thought it might be worth sharing.

It's a blank HTML file (0 byte without HTML comments) but it's got text, images and rollover effects.

cow.neondragon.net/stuff/nocod ...

From my blog @ cow.neondragon.net/index.php/2 ...

Philipp Lenssen [PersonRank 10]

15 years ago #

Hmmm... interesting...

Kevin Wallace [PersonRank 1]

15 years ago #

It's in the HTTP headers. The following header is sent:

Link: <nocode.css>; REL="stylesheet"; MEDIA="screen"

If you view cow.neondragon.net/stuff/nocod ... you can see the CSS that creates the page you see.

Interesting technique; I didn't know about the Link header until now.

Brian Mingus [PersonRank 10]

15 years ago #

this can't be good

Jeff Atwood [PersonRank 1]

15 years ago #

HTTP/1.1 200 OK
Via: 1.1 ISA
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Content-Length: 17
Date: Sat, 22 Oct 2005 01:26:50 GMT
Age: 51
Content-Type: text/html; charset=ISO-8859-1
Server: Apache
X-Powered-By: PHP/4.4.0
Link: <nocode.css>; REL="stylesheet"; MEDIA="screen"
Keep-Alive: timeout=15, max=100

<!-- No HTML! -->

Andrew Kao [PersonRank 0]

15 years ago #

How do you add a link to the HTTP header?

Philipp Lenssen [PersonRank 10]

15 years ago #

(Sigh, I saw the "rel="stylesheet" in the http header, but the web site I was checking the http header allowed itself to be HTML-injected... so the <nocode.css> didn't show!)

Brian Mingus [PersonRank 10]

15 years ago #

can you link to an empty stylesheet which has headers which link to another ad infinitum?

Cow [PersonRank 2]

15 years ago #

Yeah, you guys got it. I only found out that you could use the Link header for stylesheets yesterday – it's quite a nice way of sending CSS only to Gecko or Opera 9 but I've never heard of anyone ever using Link HTTP Headers for sending stylesheets before.

The content attribute of CSS is also really cool, half the people I know aren't aware it exists or that CSS can write content.

I don't think you could get a stylesheet to link to another stylesheet and get recursion – the Link header with rel stylesheet should only make sense for HTML files.

Goh Wei Zhong [PersonRank 0]

15 years ago #

> How do you add a link to the HTTP header?

It's a PHP thing, just include <?php header('--header-content--'); ?> in the PHP file.

Badmoon [PersonRank 0]

15 years ago #

Where did the game go we can no longer get there from the states

This thread is locked as it's old... but you can create a new thread in the forum. 

Forum home

Advertisement

 
Blog  |  Forum     more >> Archive | Feed | Google's blogs | About
Advertisement

 

This site unofficially covers Google™ and more with some rights reserved. Join our forum!