Same name in other branches
- 5.0.x src/Asset/JsOptimizer.php \Drupal\advagg\Asset\JsOptimizer::addDnsPrefetch()
- 6.0.x src/Asset/JsOptimizer.php \Drupal\advagg\Asset\JsOptimizer::addDnsPrefetch()
- 8.x-3.x src/Asset/JsOptimizer.php \Drupal\advagg\Asset\JsOptimizer::addDnsPrefetch()
Overrides AssetOptimizer::addDnsPrefetch
File
-
src/
Asset/ JsOptimizer.php, line 25
Class
- JsOptimizer
- The JavaScript Optimizer.
Namespace
Drupal\advagg\AssetCode
protected function addDnsPrefetch(array $asset) {
// Check if Google Ad Manager and add DNS prefetch.
$prefetch = $this->testForGoogleAdManager($asset['data']);
// Check if Google Analytics and add DNS prefetch.
$prefetch += $this->testForGoogleAnalytics($asset['data']);
return $prefetch;
}