Be warned though: it's not just minified, it was clearly pretty obfuscated before it was minified.

Huh, that's new. Definitely wasn't there when the strip first went up.

[edit] However, pulling it apart, it looks like it doesn't actually contain any information that'll help us find future panels - that's still all serverside. I think this is just some fanciness to make it automatically change if you just leave the page open, so you don't have to keep refreshing.

Honestly I'm loving this. Though I do think it is simply changing on the half hour.

I previously pointed out that I have a cron job collecting and dumping them into a dropbox folder here: dropbox(dot)com/sh/lkddoimlwidux4b/_BweKh8LPL

So far I have 9 images. I might be missing the first one from being late on the uptake. If anyone has the permalink to it (or if could tell me for certain that I've caught them all), I would appreciate it.

Failed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_startFailed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_errorFailed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_startFailed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_errorFailed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_startFailed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_errorFailed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_startFailed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_errorFailed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_startFailed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_errorFailed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_startFailed to load resource: the server responded with a status of 404 (Not Found) http://xkcd.com/events/connect_error

I refreshed the page after clearing the cache. It's gone back to image 1. Has that happened to someone else?

Apparently, 1 in 5 people in the world are Chinese. And there are 5 people in my family, so it must be one of them. It's either my mum or my dad. Or my older brother Colin. Or my younger brother Ho-Chan-Chu. But I think it's Colin -- Tim Vine

Indeed quite astonishing so many missed the javascript (i now see somebody posted it above).Just ignore the random stuff at the beginning, start at the end: It waits for an event (which probably comes from Randall), then JSONs a new hash and changes the shown image.

Ok, well they are now definitely moving of their own accord. The page must be auto refreshing somehow because they have moved a few times for me in the last half hour or so without me refreshing the page myself.

Or is it starting to drive me insane to the extent that I am seeing things?!

I haven't pulled it all apart, but I recognise a couple of the pieces... it's a way for the JS to connect to the server and wait for the server to tell it when there's a new panel up, so it can automatically load it up. So you can just leave the comic page open and it'll automatically load the new panel, rather than having to refresh it constantly. The bit that tells you what the next panel is is still serverside, so that doesn't help us find the new panels faster... it just hopefully reduces the server load somewhat.

Guys first post here. I couldn't just lurk this out.The meta-narrative in this piece is so great.And by piece I'm including all of you fans. I mean, all of us.There are so many levels that are only possible by XKCD having a so particular fandom.I could layer level of fascination uppon level on fascination but I will only say that Munroe said "time, you have to wait for it" and all of us are instantly trying to beat time.

It's so nice. :'-)

Going back to lurking mode. It's only a matter of time for everything to unfold.

phlip wrote:I haven't pulled it all apart, but I recognise a couple of the pieces... it's a way for the JS to connect to the server and wait for the server to tell it when there's a new panel up, so it can automatically load it up. So you can just leave the comic page open and it'll automatically load the new panel, rather than having to refresh it constantly. The bit that tells you what the next panel is is still serverside, so that doesn't help us find the new panels faster... it just hopefully reduces the server load somewhat.

The image data the JS fetches is formatted like this:id: 49348c7c-9528-11e2-8001-1c6f659cb250event: comic/timedata: {"spread":5,"image":"49b69c39cdd429cdf367e215a878f536dc566862ae00b91814adfbd264753d89.png"}

Perhaps the hash is somehow based on the id? Anyway, I think we can just give it up right now -- I suspect Randall didn't want us to break this, and the easiest way to do that would be to simply not let the hash be systematic.

Guys first post here. I couldn't just lurk this out.The meta-narrative in this piece is so great.And by piece I'm including all of you fans. I mean, all of us.There are so many levels that are only possible by XKCD having a so particular fandom.I could layer level of fascination uppon level on fascination but I will only say that Munroe said "time, you have to wait for it" and all of us are instantly trying to beat time.

It's so nice. :'-)

Going back to lurking mode. It's only a matter of time for everything to unfold.

I while back I had written this AutoIt script to take screenshots of a given window every few seconds and keep checking if something changes. Time to run it, then...

Apparently, 1 in 5 people in the world are Chinese. And there are 5 people in my family, so it must be one of them. It's either my mum or my dad. Or my older brother Colin. Or my younger brother Ho-Chan-Chu. But I think it's Colin -- Tim Vine

Looks to me like Randall is setting something up for this year's April 1.

That's apparently Randall's BitCoin address.

Apparently, 1 in 5 people in the world are Chinese. And there are 5 people in my family, so it must be one of them. It's either my mum or my dad. Or my older brother Colin. Or my younger brother Ho-Chan-Chu. But I think it's Colin -- Tim Vine

The JavaScript really isn't exciting, neither is the data the event stream is sending us.

The ID is just a UUID used for the SSE (Server-Sent Event) protocol, so not related to the image file name. The JavaScript isn't obfuscated but just minified. Most of the JS is boiler plate/library support. In essence, it's allowing the server to send new image paths to the browser. The "spread" in the message gets multiplied by a random value between 0..1 and interpreted in seconds: The browser will wait that long before loading the image. Probably to avoid spamming the server with all requests at once.

The file names still get determined on the server, as well as the interval at which new images get displayed.

We did not invent the algorithm. The algorithm consistently finds Jesus. The algorithm killed Jeeves. The algorithm is banned in China. The algorithm is from Jersey. The algorithm constantly finds Jesus.This is not the algorithm. This is close.

It is waiting for the comic/time function to show a new image, that bit is clear... But I don't understand that use of the random element function... Anyone can clear that up? I mean, they're just waiting for us to crack the code!

It is waiting for the comic/time function to show a new image, that bit is clear... But I don't understand that use of the random element function... Anyone can clear that up? I mean, they're just waiting for us to crack the code!

It's just a random delay between there being a new image, and it loading the new image... so that it doesn't result in everyone trying to load it at the same time.