2

How do I go about changing the file path of the aggregated CSS file paths?

As most of you know, when using the Drupal option (from admin/config/development/performance) to 'Aggregate and compress CSS files' Drupal creates different CSS files that look something like this:

CSS File Example

My issue is that my site visitors are always seeing the cached (old) version of my stylesheet when they visit my site. Of course I always want them to see the newest version, but I also want to optimize my website as well as possible.

Back to my original question. Is there any way to change the path that looks like gibberish (first example starts with "791YXB.....") ? I've gone through several of the questions here, but I can't find an exact answer for this.

Just for reference, this is how my performance options are setup:

Performance options

After making changes to my CSS files I also always click the button to 'Clear all caches'.

4
  • If you do clear caches then the latest css should be served. When Drupal rebuilds caches and agregate is on it recreates the aggregated versions of the css files. The 'gibberish' is the best way to let the browser know that a different css file is now served.
    – Wtower
    Commented Dec 11, 2014 at 16:11
  • Do you still get this problem if you turn off 'cache pages for anonymous users'? Commented Dec 11, 2014 at 16:15
  • @Wtower: That's what I thought should be the case, but the css file paths remain the same even after clearing all caches. @ autopoietic: Having that option turned off changes things. I noticed that some of the same files are served up with the same file path, some files are no longer being served up, and some files are new. Doesn't seem to be fixing my issue.
    – SuperTony
    Commented Dec 11, 2014 at 16:43
  • are you running a php opcode cache? Did you clear it too?
    – tenken
    Commented Dec 11, 2014 at 18:51

1 Answer 1

1

Not the answer you're looking for but it does solve the problem you're having (old css); try the Advanced CSS/JS Aggregation module.

6
  • 1
    I wish I hadn't been stubborn about installing this module. This module solved my issue. I used the Increment Global Counter button under Drastic Measures > Force New Aggregates. This changes the file path of the aggregated CSS files and will ensure that my users are served the newest CSS file as needed. I tried to use the 'Smart Cache Flush' and 'Clear All Caches', but had no success, I'm guessing it has to do us using Acquia or how our Drupal installation is setup (or both). Thank you everyone for your help!
    – SuperTony
    Commented Dec 11, 2014 at 21:41
  • Any tips/feedback in terms of making AdvAgg less intimidating?
    – mikeytown2
    Commented Dec 11, 2014 at 22:14
  • @mikeytown2 In my experience you can just turn it on and it works, so you could do that and then tweak the odd setting over time and see what's what.
    – bloke_zero
    Commented Dec 12, 2014 at 9:31
  • @mikeytown2: As bloke_zero said, it's really a plug and play module. Granted I didn't download this module with the purpose of aggregating my CSS/JS files, but looking at the basic options this module is setup to start aggregating your files as soon as you install/enable it.
    – SuperTony
    Commented Dec 12, 2014 at 22:33
  • @bloke_zero, Tonio I guess I wasn't super clear with my last comment. I'm the creator of AdvAgg. I'm always curious as to what difficulties people have and was wondering what made AdvAgg intimidating and what things could I do to improve it and make it more friendly.
    – mikeytown2
    Commented Dec 12, 2014 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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