Send anything through Google AMP with this one weird trick

You can just start with font data (preferably typed as application/octet-stream), then everything after the font passes through unmodified. I'm 100% serious.

Example of said font data:

00010000000a0080000300204f532f3269f96f2b0000013400000056636d
6170000b00730000018c00000034676c796600000000000000ac00000001
6865616427594c4f000000d400000036686865610d9f076e000001100000
0024686d7478028b00000000010c000000046c6f636100000000000000d0
000000046d617870004103c1000000b0000000206e616d65000600000000
01c000000006706f7374ffdb005a000001c8000000200000000000010000
00010354002b0068000c0001000000000000000000000000000800040000
00000001000000025eb8624511a85f0f3cf5001f080000000000e0fad139
00000000e0fad139f7d6fc4c0e5909dc000000080002000000000000028b
000000010000076dfe1d00000efef7d6fa510e5900010000000000000000
00000000000000010001040e019000050000053305990000011e05330599
000003d7006602120000020b060303080402020400000001000000000000
000000000000506645640040002000200614fe14019a076d01e300000001
000000000000000000020000000300000014000300010000001400040020
000000040004000100000020ffff00000020ffffffe00001000000000000
0000000600000003000000000000ffd8005a000000000000000000000000
0000000000000000

Example URL:

https://your--worker-your--org-workers-dev.cdn.ampproject.org/r/s/your-worker.your-org.workers.dev/your-path

Only catch: AMP is a cache, so if you want different data out, you'll need to change the URL you put in.

More posts