function _drupal_flush_css_js in Drupal 10
Same name and namespace in other branches
- 8 core/includes/common.inc \_drupal_flush_css_js()
- 6 includes/common.inc \_drupal_flush_css_js()
- 7 includes/common.inc \_drupal_flush_css_js()
- 9 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.
3 calls to _drupal_flush_css_js()
- DbUpdateController::info in core/
modules/ system/ src/ Controller/ DbUpdateController.php - Returns the info database update page.
- drupal_flush_all_caches in core/
includes/ common.inc - Rebuilds the container, flushes all persistent caches, resets all variables, and rebuilds all data structures.
- system_install in core/
modules/ system/ system.install - Implements hook_install().
File
- core/
includes/ common.inc, line 535 - Common functions that many Drupal modules will need to reference.
Code
function _drupal_flush_css_js() {
// The timestamp is converted to base 36 in order to make it more compact.
Drupal::state()
->set('system.css_js_query_string', base_convert(\Drupal::time()
->getRequestTime(), 10, 36));
}