10 Checks Before Launching Your Javascript
Inspired by the the article 15 Essential Checks Before Launching Your Website a small list of simple checks to a avoid unnecessary errors when getting your js code in production.
It does not contain the plain good old best practice rules on how you write your js code but these checks are mainly about code snippets that help you develop and debug your code in a fast and easy way that should not be around in the live version.
- check for console statements (console.log, console.startTime....)
- check for debugger statements
- check your outcommented try catch statements
- check for large outcommented old code fragments. If you are at the stage of going live this might be the time to get rid of it.
- look for fixed url's which might work in the development environment but not on the production server
- if you are using google maps make sure you have an api key for the live server
- check for credentials in your comments or code (like usernames and passwords)
- when using javascript libraries or frameworks make sure you include the minified production version and not the fully commented debug version.
- off course the same goes for your own js files
- and this last check works for me personaly: check on the "TO DO" string in the js code. When I still need to do some work on a part of the code I always flag it with a //TO DO comment.
This list is probably far from complete. Anybody any suggestions?
Labels: checks, javascript, list
2 Comments:
This post has been removed by a blog administrator.
By
Anonymous, At
November 17, 2009 7:29 PM
Great Site. Was added to mybookmarks. Greetings From USA.
By
Anonymous, At
March 4, 2010 10:11 AM
Post a Comment
<< Home