Improve the real or perceived speed of the site, or monitor performance metrics.

Jettison

Jettison unwanted CSS and JavaScript files!

This module provides a hook-based mechanism for getting rid of unwanted CSS and JS files. Simply declare which files you want deleted, and this will take care of removing them.

There's also a nice administration interface that can be used for simple cases.

What is it good for?

Sometimes a module adds CSS or JS that you don't want (or don't want to show up on non-admin themes). Use Jettison to get rid of them.

Occasionally, modules put their CSS/JS on every page when it should really only be on a few isolated pages. A jettison hook can be used to detect the conditions and then remove strategically.

Examples

Say we have a module called Example, and we want to remove the foo.js that some other module adds. Here's how to accomplish this in Jettison's API:

function example_preprocess_page(&$vars) {
  $icky_js = drupal_get_path('module', 'foo') . '/foo.js';
  jettison_js($icky_js, 'module');
}

Or to remove a CSS file from some offending theme (yes, this would be an edge case), we can do this:

function example_preprocess_page(&$vars) {
  $ugly_css = drupal_get_path('theme', 'ugly') . '/foo.css';
  jettison_css($ugly_css, 'theme');
}

If your needs are more sophisticated than a simple removal, you might want to look into the following API functions:

Variable Cleanup

Your variable table can get bloated under three circumstances:

Smart Flush

Whenever the cache is cleared (or "flushed" in Drupal parlance), whether from new content creation of a volundary flush, the burden of caching is moved to the users: files are not actively rebuilt

TestData

TestData is a developer module intended for large Drupal sites that require a consistent, fast method of providing sample data to automated acceptance and performance testing tools.

The Grinder, jMeter and Selenium are examples of tools that test your site by creating real traffic that mimics user actions. Writing these tests often requires easy access to your site's data, for usage in the tests.

BundleCache

BundleCache is a module that allows more intelligent bundling of CSS and JavaScript files by grouping only files that belong together.

Google Analytics Counter

Google Analytics Counter Custom Field

The Google Analytics Counter module is a scalable, lightweight page view counter which stores data collected by

Pages

Subscribe with RSS Subscribe to RSS - Performance