Best Practice for CSS file versions

23 views
Skip to first unread message

Mark Pitely

unread,
Nov 2, 2021, 10:20:23 AM11/2/21
to dot...@googlegroups.com
There's got to be a good way to make sure that when a CSS file is updated, the new one is pushed down to all the users.
Ideally, we could append 'modified date'  (or inode, I guess) to the CSS files.
I'm just trying to think of the best/easiest way to implement that. Right now, my CSS files are just text entries in the html_head.vtl rather than a pull or something. I think I would also like to keep them as files rather than some other format (structure, etc).

I was considering using a content type and using a relationship to the files, which should give me all the metadata I need to do it. Alternatively, I could extend file type structure to give it an order, and then pull files based on that (order critical as we are talking about css, of course).

Anyone doing anything like this?

Mark Pitely
Marywood University

Will Ezell

unread,
Nov 2, 2021, 10:28:02 AM11/2/21
to dot...@googlegroups.com
Mark:

See the cache busting solutions here.  While they are geared towards CDNs, they are really just general ways of keeping assets fresh.  You could use any combination of them.

https://dotcms.com/docs/latest/cdn-considerations#sitewide

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAFeiKqPaEmC7m1k9VY%2B6VofUapHOzh9vK9kXRXYyEshEM8VVLA%40mail.gmail.com.


--



382 NE 191st St #92150
Miami, Florida 33179-3899
Main: 
305-900-2001 | Direct: 978.294.9429

Mark Pitely

unread,
Nov 2, 2021, 10:41:04 AM11/2/21
to dot...@googlegroups.com
Wow, thanks!
Please accept my apologies for not reading the documentation first. I never saw that before.
Perhaps also link/reference it somewhere besides 'CDN Considerations' which is my lame excuse for not finding it earlier.


Mark Pitely
Marywood University

Reply all
Reply to author
Forward
0 new messages