Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

346
Views
How do I change the URL parameters after reloading the page?

I need to change a url parameter after reloading the page. When I refresh the page, need to change that parameter's value.

window.location.href = myUser + '?myuserid=' + myuserid + '&product=' + product + '&domain=' + domain + '&isPassed=' + true;

After reloading page, I have to change the value of isPassed to false.

Hope your support to solve my problem. Thank you

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This can be done by modifying the document.location.search. Urls are broken down into protocol (Http, https), hostname (www.stackoverflow.com), pathname (/questions/71790720/how-do-i-change-the-url-parameters-after-reloading-the-page), search (?param1="something"&param2=...), and hash (#something). All of these are accessible with window.location.

const user = "Eric"
const userId = 1
const product = "banana"
const domain = "something"
const isPassed = false
window.location.search = `${user}? 
myuserid=${userId}&product=${product}&domain=${domain}&isPassed=${isPassed}`
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!