Summary | POST full text of the web page being bookmarked with the bookmarklet |
Queue | Trean |
Type | Enhancement |
State | Accepted |
Priority | 1. Low |
Owners | chuck (at) horde (dot) org |
Requester | chuck (at) horde (dot) org |
Created | 11/12/2011 (4932 days ago) |
Due | |
Updated | 01/21/2013 (4496 days ago) |
Assigned | |
Resolved | |
Milestone | |
Patch | No |
Assigned to Chuck Hagenbuch
State ⇒ Accepted
https://encrypted.google.com/search?oq=javascript+bookmarklet+full+source+of+current+page&sourceid=chrome&ie=UTF-8&q=javascript+bookmarklet+full+source+of+current+page
http://stackoverflow.com/questions/13097416/bookmarklet-to-submit-page-source-to-form
http://javascript.about.com/library/blsource.htm
Compression, if needed on the source:
https://encrypted.google.com/search?oq=javascript+compression&sourceid=chrome&ie=UTF-8&q=javascript+compression
State ⇒ New
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ POST full text of the web page being bookmarked with the bookmarklet
Queue ⇒ Trean
Milestone ⇒
Patch ⇒ No
bookmarked if it's password protected, grab it with javascript and
send it along to trean. From
http://www.randsinrepose.com/archives/2011/01/25/interview_marco_arment.html:
What part of Instapaper's infrastructure are you most proud of?
The bookmarklet has a mechanism to save pages from sites that require
logins for full content, such as the Wall Street Journal and Harper's,
by sending a copy of the page's HTML from the customer's browser to
the server. It's like automating the "Save as..." menu item: if you
have your own account for these sites and can see the page in your
browser, you can save it to Instapaper.
The way it does this is ridiculous: instead of calling a simple GET
request to save the page, since an entire page's contents would
quickly overrun any URL-length limits in the stack, it injects a FORM
with a POST action and populates a hidden value with the page contents.
But form-data requests from browsers aren't Gzip-compressed, so the
resulting data is huge and needs to be sent over people's (often slow,
often mobile) upstream connections. So I found an open-source DEFLATE
implementation in Javascript - really - and the bookmarklet compresses
the page data right there in the browser before sending it.
The whole procedure is hideously complex, but works incredibly well.