Transferring large amounts of data from one page to another without POST?

I use a web server structure that works only with GET requests, at the moment I'm trying to transfer a large amount of data, that is, text content in a text field that comes from user input, to another page that echoes user input.

I tried to execute Querystrings, but in the end I get the error "The requested URL is too long."

Any suggestions as to which method I should use?

+5
source share
2 answers

If you can only send data encoded in GET requests, you will have to split the request and send it in several parts.

You can either use Ajax or store the entire dataset in localStorage and load each piece every time the page reloads.

One approach is to query the endpoint that gives you a unique identifier. Then send a series of requests in the form ?id=XXX&page=1&data=... before closing it with ?id=XXX&total_pages=27 , after which you collect different fragments on the server.

This path is insanity . It would be much better to add POST support to your infrastructure.

+1
source

Try using Javascript cookies. you can save the textarea value and then read it on another page (or wherever you want).

Here's a tutorial http://www.w3schools.com/js/js_cookies.asp

+1
source

Source: https://habr.com/ru/post/1211822/


All Articles