News for hackers. Stuff that matters.
Re:Snake game in a data: URI by mathias on Friday December 09, 2011 @03:21AM (#3333041)
> "CHIP. CHIP, WAKE UP. YOU KNOW WHAT WOULD BE TOTALLY BITCHIN'? A VERSION OF SNAKE THAT COULD FIT IN A URI!"

Sorry to Melvin all over this comment, but technically, anything can fit in a data: URL. On its own, it’s not much of an accomplishment.

OTOH, a fully functional snake game that fits in ~1KB is pretty impressive. Kudos to you, sir!

Re:Snake game in a data: URI by bytex64 on Friday December 09, 2011 @03:35AM (#3333064)
I read somewhere that most browsers have a practical limit to what you can paste in. What I should have written was that it would fit in an address bar. shrug
Re:Snake game in a data: URI by DanBC on Friday December 09, 2011 @04:11AM (#3333135)
I agree, RFC2397 shows a bunch of things that can limit the length of a data URL.

(http://www.ietf.org/rfc/rfc2397)

Re:Snake game in a data: URI by mathias on Friday December 09, 2011 @07:28AM (#3333475)

    The "data:" URL scheme is only useful for short values. Note that
    some applications that use URLs may impose a length limit; for
    example, URLs embedded within <A> anchors in HTML have a length limit
    determined by the SGML declaration for HTML [RFC1866]. The LITLEN
    (1024) limits the number of characters which can appear in a single
    attribute value literal, the ATTSPLEN (2100) limits the sum of all
    lengths of all attribute value specifications which appear in a tag,
    and the TAGLEN (2100) limits the overall length of a tag.
These are references to (theoretical) limitations in HTML/SGML. They are not limitations of the data URL scheme.

Also note that bytex64’s page doesn’t use a link; it just shows the data URL so you can copy and paste it. Either way, none of the above limitations apply here.

</nitpick>

Re:Snake game in a data: URI by maximusprime on Friday December 09, 2011 @05:09AM (#3333233)
afaik it's usually about 4k but more in modern browsers.
Re:Snake game in a data: URI by laumars on Friday December 09, 2011 @12:57PM (#3334699)
Where does the "CHIP. CHIP, WAKE UP" quote come from. I recognise it, but I can't recall why.
Re:Snake game in a data: URI by daeken on Friday December 09, 2011 @03:53PM (#3335554)
It's a reference to the beginning of The Matrix.