`

how the drupal set css/js query string for cache buster

    博客分类:
  • web
 
阅读更多

Css/js can be cached by browser, CDN or Varnish cache. If a new version css/js released, we want browser/CDN/Varnish request drupal to get new version.

Drupal will append a random string to css/jss url to work as cache buster.

[How to generate query string?]
This random string is stored in DB variable table by default, named as ‘css_js_query_string’. When common.inc drupal_flush_all_caches() is called, it will call _drupal_flush_css_js() then generate a random string with 6 characters.

We can also hard code the value in settings.php.

[How to use the query string?]
In common.inc drupal_pre_render_styles() function, it will call variable_get(‘css_js_query_string’,0) to get the value and append on each css.

分享到:
评论

相关推荐

    Drupal.8.for.Absolute.Beginners.1430264667

    You will first learn how to set up and customize a basic blog using Drupal, one of the most powerful and popular content management systems available today. From there you will learn the basics of ...

    drupal 6.12

    - Various Drupal features require that the web server process (for example, httpd) be able to initiate outbound connections. This is usually possible, but some hosting providers or server ...

    Drupal 6 Themes: Create new themes for your Drupal 6 site with clean layout and powerful CSS styling

    Drupal employs a specialized templating system and supports themes, which allow you to change the look and feel of the system's front and back-end interfaces. Drupal 6 Themes is an ideal introduction...

    Decoupled Drupal in Practice

    Several projects point to a decoupled future for Drupal, including the Contenta CMS and work to modernize Drupal’s JavaScript using React. Begin learning about these and other exciting developments ...

    drupal-scaffold, 使用 Drupal/core更新 Drupal scaffold文件的Composer插件.zip

    drupal-scaffold, 使用 Drupal/core更新 Drupal scaffold文件的Composer插件 ...) 插件,用于自动下载Drupal脚本文件,通过编写器使用 drupal/core 。建议在 root root的项目的标准位置放置供应商目录;但是,供应商目

    弃用:有关最新代码和问题,请参阅https://drupal.org/project/dropzonejs-DropzoneJS的D8集成。-PHP开发

    关于DropzoneJS这是DropzoneJS的Drupal 8集成。 ###如何安装:下载此模块下载DropzoneJS并将其放置在库文件夹中以通常方式安装dropzonejs删除“ test”文件夹f关于DropzoneJS这是DropzoneJS的Drupal 8集成。 ###如何...

    [Drupal] Drupal 响应式主题 开发教程 (英文版)

    Ideal for experienced Drupal developers, this book takes you through RWD basics and shows you how to build sites based on Aurora, Zen, and Omega—three popular base themes created by Drupal ...

    window下安装drupal教程

    Drupal安装教程 在本文中,我们将详细介绍如何在 Windows 平台下安装 Drupal 内容管理系统(CMS)。Drupal 是一个国外非常流行的 CMS,具有强大的一切功能和插件支持。 安装 WAMP 首先,我们需要安装 WAMP...

    Apress.Drupal.8.for.Absolute.Beginners.pdf

    《Apress Drupal 8 for Absolute Beginners》是一本面向初学者的入门级教程,它详细介绍了如何从零开始使用Drupal 8构建网站。 该书首先介绍了Drupal 8的基本网站构建,包括使用Drupal自带的功能和模块。书中解释了...

    drupalux:来自 Drupal 的清单

    10 Drupal UX Powerups 1. 登录/注册 查看 使用 尝试 , , 2. 表格验证 查看 使用 、 (谨慎)、电子邮件、日期等(+ 或 ) 尝试: , , 3. 错误信息 使用 (小心!)尝试: ...

    Drupal.8.Development.Beginners.Guide.2nd.Edition.epub

    With more and more organizations looking to build engaging digital experience for their stakeholders, the Drupal Content Management System offers a mobile-first platform with native support for ...

    Drupal.8.Configuration.Management.1783985208

    Drupal 8 Configuration Management is intended for people who use Drupal 8 to build websites, whether you are a hobbyist using Drupal for the first time, a long-time Drupal site builder, or a ...

    drupal安装使用笔记

    Drupal 是一个开源的内容管理系统(CMS),它允许用户创建、管理和发布网站内容,而无需深入了解复杂的网页编程技术。本文将详细讲解Drupal的安装过程以及如何在Drupal中安装和使用所见即所得的编辑器FCKeditor。 ...

    varnish-for-drupal:Drupal 7 的清漆 3.0 配置

    Drupal 7.x 的清漆 3.0 旨在与清漆、清除和过期模块一起使用。 根据 drupal.org/project/varnish 上的文档,您应该在 settings.php 文件中添加如下内容: $ conf [ 'cache_backends' ] = array ( 'sites/all/modules...

    lightning-project, 一个基于作曲器的安装程序,用于 Drupal 8的闪电分配.zip

    lightning-project, 一个基于作曲器的安装程序,用于 Drupal 8的闪电分配 这是一个基于的安装程序,用于的。 欢迎使用未来 !开始$ composer create-project acquia/lightning-project MY_PROJECTComposer将创建一个...

Global site tag (gtag.js) - Google Analytics