I'd like to know what are the options for providing data during cross-domain navigation between pages in browser and if there's any common practice for that.
As an example of what I'm facing right now:
Say I'm on https://PageA.com and when user clicks some link I want to show another page https://PageB.com which is hosted on another domain. With that I want to provide some additional information for Page B, which it can use during loading. It could be literally any data that Page A has: user name, address, theme, whatever else... Let's just assume that there's a lot of data that Page A can provide.
One of the solutions I know is to put this data into query parameters so navigation url would look something like: https://PageB.com?username=...&address=...&theme=... It's OK to use when number of parameters is fixed and "small", I mean when url length don't reach the limit. However if there's a lot of data it can't be used.
Another solution that I know is to temporarily store data on server: Page A makes POST request to the server, server stores data somewhere and returns a key that could be used to fetch that data. I navigate to Page B providing key in a query parameters - https://PageB.com?key={key}, and Page B should fetch data from the server using that key. This seem to be an OK solution for my example.
However I'd like to know if there is any other solution to this? What are the common practices when there's a lot of data to be provided?
Thanks in advance!