Mobile app version of vmapp.org
Login or Join
Cofer257

: There are two ways to do this, both of which are a bit tedious. Method #1: Search the code Use a tool to do a text search throughout all of your code for each file name. (Just the

@Cofer257

There are two ways to do this, both of which are a bit tedious.

Method #1 : Search the code

Use a tool to do a text search throughout all of your code for each file name. (Just the file name, not the path! Relative paths are often used.) Then, make a determination for each instance whether or not that file is in use. This is a real hassle, but important.

Method #2 : Analyze server logs

Run a crawler on all of your pages. Check your server's access log. Write a script to (or manually) search through that log for each file name in your source tree to see if it was accessed. Danger Will Robinson, as this will not catch included files! This is only useful for resources loaded client side, such as CSS, JS, and images. Also beware of minification that hide that these files are in use.

Finally, when you are all done, be sure to check error logs and what not to see if you broke anything. Make backups (and/or version control!) as you go.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Cofer257

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme