My page has a JSON parameter so it shows on the URL something like this:

How can you hide the parameters to not show on the URL?

Put the # in the href e.g. href="#" and write a JavaScript function to the onclick event which manipulates the actual link in the anchor a element. 

Doing this you actually show the fake URL when hovering over the link but the link will be supplied when the user actually clicks.

Swatantra Kumar wrote:

Doing this you actually show the fake URL when hovering over the link but the link will be supplied when the user actually clicks.

Not sure if I get it but will this hide the actual URL in the address bar of the browser?


No sorry, it will only hide on the mouseover, but in addressbar it'll expose. 

If the URL/method you are leading accepts the post, then try posting the data through POST with jQuery ajax.

Hi,

Did you try this:

You have this component from forge: CryptoAPI.

Some of the options you have are thease:

  • Encrypt all the inputs. In this case is still possible to see the number of inputs.
  • Transform all inputs into a JSON. Ecrypt that JSON and sent it as input
  • Save all inputs on a database record with a guid associated. Send the guid as input

And for sure you have a lot more options to secure your data if you are creative.


Cheers,
Nuno Verdasca

Hi Juan,

How you reach the page? By button?


Regards, Paulo Torres

Solution

If you're navigating to this page from a different WebScreen in your application, you shouldn't be passing information via URL in this way.


Here, you have a couple of options:

  1. You can use Session Variables (Web) or Client Variables (Reactive Web) to store temporary information per-user.

  2. You can save your unstructured (or structured) data in a database table (let's call it TempJson), and then pass the relevant Identifier to your WebScreen:

    https://example.com/Applicant?TempJsonId=23

    The JSON can then be fetched in the Preparation of your WebScreen, or asynchronously for Reactive Web pages.
    This same point had been suggested by Nuno already.


If you're navigating from outside your OutSystems application to the Applicant page, Swatantra's and Nuno's answers will help you:

  • If you receive data using POST rather than GET, as per Swatantra's suggestion, the data will be received in the HTTP Body rather than the URL. You can then read the Body data using the GetRequestContent action.
  • Alternatively you receive the JSON encrypted, and decrypt it using the Crypto API, as per Nuno's suggestion.
Solution

Hi Juan,

Gonçalo gave a very complete answer, but just wanted to add another scenario.

If you're using a traditional web app, you just have to define the Method property of your Button/Link to Submit. That will define that the request will me executed as a POST, not showing the parameters in the URL.


Cheers,

Tiago.

Paulo Torres wrote:

Hi Juan,

How you reach the page? By button?


Regards, Paulo Torres

Yes by a button in the application. But I think in the future, there will be a use case that it will be coming from another application and could also be not made in OutSystems.


Gonçalo Soares wrote:

For this one above, I don't think this is available now. The reason I went for JSON is actually because I can't use structures on Client Variables on React.

Thank you guys for the ideas presented here. I will just try them out or present to my team.


Although Client Variables don't accept structures, you can use the built-in JsonSerialize to convert the structure to JSON format, and store it as a Text Client Variable.

In your Destination Screen, you can deserialize the result using the JsonDeserialize action to recover the structure.


I suspect you're doing this already, since you're passing the input as JSON in your URL parameter :-)