Archive

Archive for March, 2010

Apache Full Status: How to view current pages being requested

March 25th, 2010 No comments

Here's a quick command I learned that shows information about the current requests Apache (httpd) is handling:

1
/usr/sbin/apachectl fullstatus

Categories: How To's Tags:

How to show the number of running Apache httpd connections

March 25th, 2010 No comments

This is a simple command I just learned to show the number of running processes for Apache:

ps aux ww | grep httpd | wc -l

Categories: How To's Tags:

How to Properly Test if jQuery is Loaded

March 5th, 2010 No comments

I saw many people claiming you can test for the existence of jQuery like this:

1
2
3
4
5
if (jQuery) {
	// jQuery exists, put code here
} else {
	// jQuery not loaded, put code here
}

This is incorrect. It will work fine if jQuery is loaded, but if it's not loaded, javascript will throw an error and the code to execute if jQuery is not loaded will probably not be processed. The modification to fix this is simple:

1
2
3
4
5
if (window.jQuery) {
	// jQuery exists, put code here
} else {
	// jQuery not loaded, put code here
}
Categories: How To's, Uncategorized Tags: