News for hackers. Stuff that matters.
Re:Hashify.me - store entire website content in the URL by dpcan on Tuesday April 19, 2011 @05:25PM (#2464291)
I see this as a remarkable answer to the problem of needing to view a cached version of the website.

For example, what if a URL were posted to Hacker News, but after the URL was a ?hasifyme=THEHASH, where THEHASH was the Hash of the website linked-to.

This way, if the URL could not be loaded because the server load was to high, you could just forward the URL to Hashify.me and the cache of the plain text from the website would still then be readable.

Boom, instant cache of the website content stored right in the URL!!!!

Re:Hashify.me - store entire website content in the URL by joshfinnie on Tuesday April 19, 2011 @06:14PM (#2464455)
You can also instantly search for dupes. Keep the hashes in a database and just check before accepting the submission.

(This has always been an idea I was thinking about; nice to see it implemented)

Re:Hashify.me - store entire website content in the URL by zalew on Tuesday April 19, 2011 @10:54PM (#2465073)
it wouldn't work: dynamic content. even comment counters below posts would change the hash.
Re:Hashify.me - store entire website content in the URL by shadowpwner on Tuesday April 19, 2011 @11:31PM (#2465142)
Actually, you can run it through an article scraper, then hash it.
Re:Hashify.me - store entire website content in the URL by zalew on Tuesday April 19, 2011 @11:54PM (#2465184)
it wouldn't be 'entire website content'
Re:Hashify.me - store entire website content in the URL by robinduckett on Wednesday April 20, 2011 @07:31AM (#2466153)
include dynamic content via javascript
Re:Hashify.me - store entire website content in the URL by zipdog on Tuesday April 19, 2011 @05:43PM (#2464360)
Clever use. But do you think it would scale? Doesn't it rely on bit.ly and/or hashify.me being able to convert the URL into a readable page?
Re:Hashify.me - store entire website content in the URL by ay on Tuesday April 19, 2011 @09:01PM (#2464831)
I am missing something. How is this dramatically different from passing around the data: URIs ?

data:text/html;charset=utf-8,However,%20data%20URI%20does%20the%20same%20without%20the%20server.

Here is a self-containing cached document, for simple texts probably with a better efficiency than base64.

EDIT: ah. The shorteners barf if you try to "shorten" the data URIs

Re:Hashify.me - store entire website content in the URL by th on Tuesday April 19, 2011 @09:29PM (#2464887)
Actually tinyurl will shorten it but your browser may not allow the redirect. Chrome throws up an error page for security reasons: http://tinyurl.com/3maue6t
Re:Hashify.me - store entire website content in the URL by ay on Tuesday April 19, 2011 @10:43PM (#2465053)
Ha, nice - I tried only goo.gl and bit.ly

With http://preview.tinyurl.com/3maue6t it works, btw.

Though, tinyurl still barfs when I try to shorten the data URI that http://software.hixie.ch/utilities/cgi/data/data gave to me when I let it grab the index of HN.

Re:Hashify.me - store entire website content in the URL by pkandathil on Tuesday April 19, 2011 @05:52PM (#2464376)
I assume hashify.me stores the value associated with the hash.

I guess for this to work well. Dont you need Hashify to provider a service where you pass in hashcode and it returns the HTML to you.

You just wrap the call with good old JSONP and you are good to go.

Re:Hashify.me - store entire website content in the URL by hashify on Tuesday April 19, 2011 @06:33PM (#2464504)
> I assume hashify.me stores the value associated with the hash.

Not so. hashify.me has no server-side component (beyond nginx serving three static files). _bit.ly_ kindly provides the hash table. ;)

Re:Hashify.me - store entire website content in the URL by jurjenh on Tuesday April 19, 2011 @07:08PM (#2464598)
I tried to make a self-referencing page, but you need to be able to generate the hash of the page url that includes its own hash...

Not having the time to do so, I leave the challenge here: http://bit.ly/ialoWI

Re:Hashify.me - store entire website content in the URL by th on Tuesday April 19, 2011 @10:25PM (#2465024)
That's not possible because the base 64 encoding is longer than the plaintext. There are 4 characters of text in the URL for every 3 characters of text entered.
Re:Hashify.me - store entire website content in the URL by sesqu on Wednesday April 20, 2011 @10:36AM (#2466753)
If you're willing to jump through hoops and js-compress your content, you can deal with this issue, unless your compressor uses something like crc. That way, you can grow the plaintext faster than the b64 - though you'd still need to do clever things with the url.
Re:Hashify.me - store entire website content in the URL by jarin on Tuesday April 19, 2011 @07:59PM (#2464725)
That's essentially what you're doing when you are trying to mine Bitcoin :)
Re:Hashify.me - store entire website content in the URL by jantangring on Thursday April 21, 2011 @12:08PM (#2471153)
Re:Hashify.me - store entire website content in the URL by messel on Tuesday April 19, 2011 @07:13PM (#2464615)
until you jumped the api limit :D why not hot swap any shortner?
Re:Hashify.me - store entire website content in the URL by hashify on Tuesday April 19, 2011 @10:28PM (#2465030)
bit.ly is the only URL shortening service to support cross-origin resource sharing, as far as I'm aware.

The _right_ thing to do would be to build a shortening service designed to handle URLs of arbitrary length. I'm not sure that I'm willing to take on that responsibility, though.

Re:Hashify.me - store entire website content in the URL by topcat31 on Tuesday April 19, 2011 @07:14PM (#2464618)
Especially if used in conjunction with a text-extraction API such as Alchemy: http://www.alchemyapi.com/api/text/

That way you only get the text of the page, stored in a cache.