I have a Drupal 8 website. I have installed the Advagg module. The URL for the JavaScript file has a string appended.

The same happens for the URLs of the uploaded images. Sometimes, the browser doesn't display the image, when its URL has that string. If I remove the string, the image is displayed. Google search console reports such files as malware.

How do I remove those strings from the end of the URL?


The strings are to ensure that the files are not cached by proxies or intermediary caches when Drupal rebuilds its own caches. Whenever Drupal's cache is cleared and regenerated these strings will change. These are 'cache buster' strings.

Check this for an explanation of what is cache busting - https://www.adopsinsider.com/ad-ops-basics/what-is-a-cache-buster-and-how-does-it-work/

| improve this answer | |
  • Thank you for the link. It means that these files are not malwares. But, Google reports some of such files as malwares. – PRAVEEN KUMAR Nov 4 '19 at 6:48

There are 2 questions here.

Why is google identifying files as malware?

This is hard to debug on a site using file aggregation, including both the core aggregation and advanced aggregation. I suggest disabling those temporarily and seeing which specific file Google identifies as malware.

Why are there strings at the end of the files?

As @anoopjohn has answered this is a "cache busting" technique used by a lot of different pieces of software.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.