1

I have a site where I save URLs and I want to process and save the entire DOM (in case the site goes down -- I'll still have access to the content).

The current version of my javascript bookmarklet (which only saves the URL and Page title) has been submitting a series of GET variables to a PHP page. However this will not work for the entire DOM because there are URL limit constrictions (usually ~15,000 characters it seems).

I think that using POST would allow me to send more information but I believe that the browser will stop it because of XSS (cross site scripting) concerns.

Is there a way to send a large amount of data (15,000char+) from a javascript bookmarklet?

I'm happy to clarify!

jeffhuber
  • 139
  • 2
  • 11

1 Answers1

1

create a form(in an iframe) -> set its values -> submit -> remove the iframe.

the reason for the iframe is so the page doesnt navigate away when you submit the form.

there wont be any permission issues.

goat
  • 31,486
  • 7
  • 73
  • 96
  • Chris - how do I get the values into the form is the form is being called in from an external iframe? I am using an iframe right now but am loading it by submitting Get variables to it. Thanks!! – jeffhuber May 24 '12 at 22:40
  • Clarification: so you create a form, fill it's values, then POST that form to the iframe you have also created on the same page? – jeffhuber May 24 '12 at 22:45
  • this: http://stackoverflow.com/questions/2195396/sending-text-cross-domain-by-bookmarklet? – jeffhuber May 24 '12 at 22:50