function _drupal_flush_css_js

Same name in other branches
  1. 7.x includes/common.inc \_drupal_flush_css_js()
  2. 9 core/includes/common.inc \_drupal_flush_css_js()
  3. 8.9.x core/includes/common.inc \_drupal_flush_css_js()

Changes the dummy query string added to all CSS and JavaScript files.

Changing the dummy query string appended to CSS and JavaScript files forces all browsers to reload fresh files.

Deprecated

in drupal:10.2.0 and is removed from drupal:11.0.0. Use Use \Drupal\Core\Asset\AssetQueryStringInterface::reset() instead.

See also

https://www.drupal.org/node/3358337

1 call to _drupal_flush_css_js()
LegacyAssetTest::testDeprecatedDrupalFlushCssJs in core/tests/Drupal/KernelTests/Core/Asset/LegacyAssetTest.php
Tests the deprecation.

File

core/includes/common.inc, line 507

Code

function _drupal_flush_css_js() {
    @trigger_error('_drupal_flush_css_js is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use \\Drupal\\Core\\Asset\\AssetQueryStringInterface::reset() instead. See https://www.drupal.org/node/3358337', E_USER_DEPRECATED);
    \Drupal::service('asset.query_string')->reset();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.