Skip to content

Instantly share code, notes, and snippets.

@emilio

emilio/t.css Secret

Created September 14, 2020 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emilio/c89d2a7bb9fa96c02da96a6b69de549d to your computer and use it in GitHub Desktop.
Save emilio/c89d2a7bb9fa96c02da96a6b69de549d to your computer and use it in GitHub Desktop.
Simplest stylesheet ever.
:root { background: red }
<!doctype html>
<link rel=stylesheet href=t.css>
@emilio
Copy link
Author

emilio commented Sep 14, 2020

First load (page is red as expected):

{
	"Response Headers (183 B)": {
		"headers": [
			{
				"name": "Content-Length",
				"value": "26"
			},
			{
				"name": "Content-type",
				"value": "text/css"
			},
			{
				"name": "Date",
				"value": "Mon, 14 Sep 2020 21:43:41 GMT"
			},
			{
				"name": "Last-Modified",
				"value": "Mon, 14 Sep 2020 21:43:40 GMT"
			},
			{
				"name": "Server",
				"value": "SimpleHTTP/0.6 Python/3.8.5"
			}
		]
	}
}

Second load (sheet not modified):

{
	"Status": "304Not Modified",
	"Version": "HTTP/1.0",
	"Transferred": "129 B (26 B size)",
	"Referrer Policy": "no-referrer-when-downgrade"
}
{
	"Request Headers (433 B)": {
		"headers": [
			{
				"name": "Accept",
				"value": "text/css,*/*;q=0.1"
			},
			{
				"name": "Accept-Encoding",
				"value": "gzip, deflate"
			},
			{
				"name": "Accept-Language",
				"value": "en,es;q=0.5"
			},
			{
				"name": "Cache-Control",
				"value": "max-age=0"
			},
			{
				"name": "Connection",
				"value": "keep-alive"
			},
			{
				"name": "Host",
				"value": "localhost:8000"
			},
			{
				"name": "If-Modified-Since",
				"value": "Mon, 14 Sep 2020 21:43:40 GMT"
			},
			{
				"name": "Referer",
				"value": "http://localhost:8000/t.html"
			},
			{
				"name": "Sec-Fetch-Dest",
				"value": "style"
			},
			{
				"name": "Sec-Fetch-Mode",
				"value": "no-cors"
			},
			{
				"name": "Sec-Fetch-Site",
				"value": "same-origin"
			},
			{
				"name": "User-Agent",
				"value": "Mozilla/5.0 (X11; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0"
			}
		]
	}
}
{
	"Response Headers (103 B)": {
		"headers": [
			{
				"name": "Date",
				"value": "Mon, 14 Sep 2020 21:45:06 GMT"
			},
			{
				"name": "Server",
				"value": "SimpleHTTP/0.6 Python/3.8.5"
			}
		]
	}
}

Change to background: green in the text editor, reload (not shift-reload). Page is green now:

{
	"Status": "200OK",
	"Version": "HTTP/1.0",
	"Transferred": "211 B (28 B size)",
	"Referrer Policy": "no-referrer-when-downgrade"
}
{
	"Request Headers (433 B)": {
		"headers": [
			{
				"name": "Accept",
				"value": "text/css,*/*;q=0.1"
			},
			{
				"name": "Accept-Encoding",
				"value": "gzip, deflate"
			},
			{
				"name": "Accept-Language",
				"value": "en,es;q=0.5"
			},
			{
				"name": "Cache-Control",
				"value": "max-age=0"
			},
			{
				"name": "Connection",
				"value": "keep-alive"
			},
			{
				"name": "Host",
				"value": "localhost:8000"
			},
			{
				"name": "If-Modified-Since",
				"value": "Mon, 14 Sep 2020 21:43:40 GMT"
			},
			{
				"name": "Referer",
				"value": "http://localhost:8000/t.html"
			},
			{
				"name": "Sec-Fetch-Dest",
				"value": "style"
			},
			{
				"name": "Sec-Fetch-Mode",
				"value": "no-cors"
			},
			{
				"name": "Sec-Fetch-Site",
				"value": "same-origin"
			},
			{
				"name": "User-Agent",
				"value": "Mozilla/5.0 (X11; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0"
			}
		]
	}
}
{
	"Response Headers (183 B)": {
		"headers": [
			{
				"name": "Content-Length",
				"value": "28"
			},
			{
				"name": "Content-type",
				"value": "text/css"
			},
			{
				"name": "Date",
				"value": "Mon, 14 Sep 2020 21:46:54 GMT"
			},
			{
				"name": "Last-Modified",
				"value": "Mon, 14 Sep 2020 21:46:53 GMT"
			},
			{
				"name": "Server",
				"value": "SimpleHTTP/0.6 Python/3.8.5"
			}
		]
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment