How to Search CSS and JavaScript Files with Google
google-search
Is there a way to find CSS / JavaScript files that contain certain keywords:
in the title ?
in the code ?
Best Answer
Use the filetype: search operator.
filetype:css
filetype:js
However,
When you use the filetype: operator in a Google search (for example, filetype:xml galway), Google searches for files with the .xml extension, not for files of file type XML.
Not all URLs or pages have the .html file extension. Some pages (like http://www.google.com) have no extension at all, and some have an extension that doesn't match their file type. Limiting your search to a specific file type will return pages with that file extension, and may return fewer relevant results.
From the little casting about I've done, it looks like you need to use OR between the filetype: operator if you want multiple filetypes.
"secrets of the javascript ninja" filetype:pdf OR filetype:torrent
My quick tests seem to jive. It's a little hard to verify, because there are so many more PDF results than Torrent results (for this particular case, at least).
Best Answer
Use the
filetype:
search operator.filetype:css
filetype:js
However,
Source.