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

143
Views
Determine via Javascript if page load was via a browser bookmark vs clicking on some link?

Say I am on my React app at http://mysite/. Then I either

(A) Click to navigate to https://mysite/#/myroute
(B) click on a browser bookmark to https://mysite/#/myroute

Can the client-side JavaScript route i.e. MyRoute know whether the navigation was via a browser bookmark vs clicking on some link?

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

0

Can the client-side JavaScript route i.e. MyRoute know whether the navigation was via a browser bookmark vs clicking on some link?

If you mean "clicking on some internal link", then yes. But there is no way to distinguish a click on a bookmark from a click on an external link that leads to your website.

In any case, you leverage the document.referrer property: if it's equal to an empty string, the user navigated from an external source, otherwise it will contain the previous internal url.

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!