How to get the current browser info in TypeScript

1 Answer

0 votes
const browserInfo: string = navigator.userAgent;

console.log(`Browser info: ${browserInfo}`);


/*
run:

"Browser info: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0" 

*/

 



answered Jul 2, 2025 by avibootz

Related questions

1 answer 127 views
1 answer 112 views
1 answer 95 views
1 answer 145 views
1 answer 113 views
...