Session.URL

I open the page using this link:
http: //127 .0.0.1 /?m=YXJ0dXIuemFyZW1iYUBvcC5wbA==&k=Og1IPWILUASGIlxqsa9GrbasGh5Ahn2
To remove parameters, I wrote:

Var newUrl As String = Session.URL
GoToURL(newUrl)

However, after reloading the page I have the address: http://localhost:8080/
Instead of “127.0.0.1” there is “localhost”
I wrote the code:

Var newUrl As String = Session.URL
newUrl = newUrl.Replace("localhost", "127.0.0.1")
GoToURL(newUrl)

but it doesn’t work because newUrl has the value = “/303566DC88224F33C25D53D70B57D1342FAC8511E5D5FA928E4530D962424BCF”
I can’t replace “localhost” because it’s not in newUrl

How can I replace 127.0.0.1 with localhost?

Localhost and 127.0.0.1 are the same thing.

Localhost and 127.0.0.1 are the same thing.

yes, but cookies saved for 127.0.0.1 are not visible on localhost :relieved:

Will this work?

Var newUrl As String = "http://127.0.0.1:8080" + Session.URL
GoToURL(newUrl)

No, the following appeared in the browser:
http://localhost:8080/
:disappointed_relieved:

What browser are you using?
What OS?

I use Chrome/Mac and I don’t get the change to localhost.

I wanted that if the address was e.g. “www.mydomain.eu” there would be no need to change it, but when testing on “localhost” the change would work

ps. I use chrome on windows 10

EDIT:
I think it will work fine on the final domain, but when I test on 127.0.0.1, the saved cookies say 127.0.0.1, and after reloading the page to localhost, the saved cookies cannot be read.

Instead of targeting 127.0.0.1, why not target localhost?

when I run xojo my project runs on page 127.0.0.1
when I use the command in my program:
GoToURL(newUrl)
then I am redirected to “loclahost”