AbanteCart Community

Shopping Cart Operations => Opinions => Topic started by: Sam_78 on March 18, 2020, 09:29:55 AM

Title: Suggestion to render latest CSS
Post by: Sam_78 on March 18, 2020, 09:29:55 AM
Hi Developers,

I have a suggestion for some CSS and JS file that customers doesn't have to clear cache when they make changes to it.
You can add a flag (toggle button) in system->setting somewhere and if it is turned ON then update the code https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/view/default/template/common/head.tpl#L50 so that it adds current time stamp every time it refreshes
<link href="<?php echo $this->templateResource('/stylesheet/style.css') . "?v=" . date("YmdHis"); ?>" rel="stylesheet" type="text/css">
Once users are done testing their changes they can simply turn OFF that button and then timestamp will be removed something similar as what you already have for if($faster_browser_rendering == true) { .. }
I am a developer and I use this so I don't have to clear cache explicitly after every change and once I am done I can simply turn it OFF

This is just a suggestion as I know it will slow down rendering css / js file but user can turn it ON and OFF.
Title: Re: Suggestion to render latest CSS
Post by: Basara on March 18, 2020, 09:34:44 AM
Thank you, Sam_78