#30046 – Forcing reload of CSS

Posted in ‘Akeeba Ticket System’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Friday, 03 August 2018 05:08 CDT
We currently have a CSS override in place at templates/media/com_ats/css/frontend.css

Whenever styling changes are made to the frontend.css file they don't immediately appear on our ticketing system unless the user clears their browser cache or does ctrl shift R on their keyboard.

Is there anyway to encourage ATS to use a fresh version of the CSS file.

I noticed from the source code that a query string is used. Perhaps this could hold the solution?

frontend.css?518e72a1dc85a32b4b894907a14d9990

Thanks,
Dale
Custom Fields
Joomla! version (in x.y.z format) 3.7.4
PHP version (in x.y.z format) 5.5.30
Akeeba Ticket System version (x.y.z format) 2.4.3
 
SatIntAKB
Friday, 03 August 2018 06:48 CDT
There is a way but it will get overwritten every time you update ATS itself.

Edit the administrator/components/com_ats/fof.xml file. Find the line
<option name="factoryClass">FOF30\Factory\BasicFactory</option>

Underneath that line type a new line with the contents
<option name="mediaVersion">YOUR_VALUE_HERE</option>

YOUR_VALUE_HERE is the media version query, i.e. what you see appended to all of ATS' CSS and JS files after the question mark. Changing that every time you make changes will effectively tell your users' browsers to skip the cached version of the file and reload it from your server.

FYI, when the mediaVersion configuration variable is not set in fof.xml our framework calculates it automatically based on the version of ATS currently installed and a unique value for your site (the $secret in your configuration.php). When you set this variable in fof.xml you override the default behavior.

Please note that the fof.xml file is part of ATS itself and it's overwritten every time you upgrade ATS. Therefore every time you upgrade ATS you'll have to do this change again.


Nicholas K. Dionysopoulos

Lead Developer and Director



Greek: native

English: excellent

French: basic



Please keep in mind my timezone and cultural differences when reading my replies. Thank you!



nicholas
Monday, 06 August 2018 05:18 CDT
Hi Nicholas,

Thanks for your reply.

I've tested your fix and it works really well with our system. I'm now able to push styling changes through easily.

I'll add some notes to our update procedure so we remember to make the change again.

Thanks again,
 
SatIntAKB
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.

Support Information

Working hours: Typically we work Monday to Friday, 9am to 7pm Cyprus timezone (EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets, but we cannot respond to them, outside of our working hours.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!

Cookies Notification - Action required

This website uses cookies to provide user authentication and improve your user experience. Please indicate whether you consent to our site placing these cookies on your device. You can change your preference later, from the controls which will be made available to you at the bottom of every page of our site.