Author Topic: Suggestion to render latest CSS  (Read 7687 times)

Offline Sam_78

  • Sr. Member
  • ****
  • Posts: 277
  • Karma: +43/-1
    • View Profile
Suggestion to render latest CSS
« 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.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5939
  • Karma: +284/-2
    • View Profile
Re: Suggestion to render latest CSS
« Reply #1 on: March 18, 2020, 09:34:44 AM »
Thank you, Sam_78

 

Powered by SMFPacks Social Login Mod