Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tracking the use of Ctrl + F by JavaScript?

Is it possible to know what my users are searching for on my web pages by Ctrl+F in JavaScript? So when a user uses Ctrl+F to search for something, JavaScript can capture this action (and the search phrase) and send it back to the server.

Possible? How?

like image 731
datasn.io Avatar asked Oct 21 '22 20:10

datasn.io


1 Answers

Nope, not possible. On some browsers you can catch the key combination Ctrl+F, but you can't spy on what the user searched for. On other browsers you can't catch Ctrl+F at all.

If it's any consolation, there's probably a security flaw you can use on IE6.

like image 95
jevakallio Avatar answered Oct 24 '22 11:10

jevakallio