diff --git a/includes/common.inc b/includes/common.inc
index cd30145..d187e03 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -5038,6 +5038,8 @@ function drupal_build_js_cache($files) {
         $contents .= file_get_contents($path) . ";\n";
       }
     }
+    // Remove JS source and source mapping urls or these may cause 404 errors.
+    $contents = preg_replace('/\/\/(#|@)\s(sourceURL|sourceMappingURL)=\s*(\S*?)\s*$/m', '', $contents);    // Prefix filename to prevent blocking by firewalls which reject files
     // Prefix filename to prevent blocking by firewalls which reject files
     // starting with "ad*".
     $filename = 'js_' . drupal_hash_base64($contents) . '.js';
