Problem: If the aggregated css/js file doesn't exist then drupal is loaded, looking for it; a 404 for the file is usually the result.
Solution: Have a lookup table pairing the old file to the new one, returning the new aggregated file in the process.
Create 2 menu hooks
file_directory_path() . '/css/%'
file_directory_path() . '/js/%'
Lookup table gets populated via http://api.drupal.org/api/function/template_preprocess_page/6 hook; $variables['styles'] for css files, $variables['scripts'] for js files. Finding related css/js files done by path, which is gathered via $_GET['q']. Store time stamp so we try the most recent versions first.
filename - aggregated filename; value from $variables['scripts'] or $variables['styles']; foreach() to grab all.
path - $_GET['q'];
timestamp - time();
Given filename get path & timestamp. Find all paths sorted by timestamp, greater then timestamp just returned in query. If file doesn't exist try next one. If file can't be found, try finding file that is closest via filesize. If still can't be found call path with special query string that temp sets $GLOBALS['conf']['preprocess_css'] = TRUE; and $GLOBALS['conf']['preprocess_js'] = TRUE. Once request is done, repeat search. If still no match finally give up with 404.
This should prevent 404's for 99% of the these cases. Thoughts?