0

How can I make an html detects this? For example, I have a game in html, can I save the score to url like "example.com/game?score=15", detect this and set score to information in url? Or at least something like that? If you know what it's called, please tell...

I tried to search (cause I don't exactly know what it is) in google and youtube but no answer.

  • 1
    `const score = new URLSearchParams(location.search).get("score");`. These parameters are not really for “storing” things. Storing is done with the [Local Storage API](//developer.mozilla.org/en/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API). – Sebastian Simon Oct 30 '22 at 14:48

1 Answers1

-1

These are what are known as Request Parameters.

Michael Cropper
  • 872
  • 1
  • 10
  • 28