I have a bit of software that I sell (HTML / JS), that a bunch of people are stealing, simply because beyond obfuscating there's not much I can do to protect it. I've been getting quite good results by tracking these down, and either getting them to buy a license, or enforcing copyright with their hosting provider.

I'd like to get better at finding them.

What I'm doing now is searching for a couple of strings that my HTML shows in <div>s to the user. Mainly error messages. However, I can only find those instances where they haven't changed those very obvious user-viewable strings (which is a problem particularly with people that translate my app, because they find these strings and change them almost every time).

Now, my code has a number of things that'd make it very easy to identify. Names of JavaScript functions which are very unique, for example, and that no one bothers to change, and they survive minification. Also IDs and CLASSes in the HTML elements, that people that steal this code tend to not change.

Is it possible to search in Google for pages that have either a certain content in their JavaScript files, or certain ID's or Classes in their HTML?

So far the best I've found is to search in URLs, but this doesn't help me unfortunately.

  • Try nerdydata.com - they let you search HTML, JS and CSS from rendered webpage code
    – d-_-b
    Apr 21, 2019 at 2:45

1 Answer 1


Up until recently Googlebot didn't even capture JavaScript or CSS content. Earlier this year Googlebot started looking at JavaScript in order to render a page more like a user sitting at a browser.

Webmaster Central Blog: Understanding web pages better

But from what I understand, it's still not looking at the underlying code; just what is actually rendered to the screen.

There is, however, at least one other search engine that purports to search within code: NerdyData. I've not used it, so I can't speak to its efficacy. It's gotten a few writeups, though.

  • Wow. It's a shame they have a very small index (almost none of the ones I found before is there) but I already found 2 new ones with that! Thank you! Oct 8, 2014 at 9:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.