Shopping Cart Operations > Opinions

Suggestion to render latest CSS

(1/1)

Sam_78:
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.

Basara:
Thank you, Sam_78

Navigation

[0] Message Index

Go to full version
Powered by SMFPacks Social Login Mod