HTML - remove cache from assets with cachebuster

0 votes
201 views
added Jun 14, 2023 in HTML by lcjr First Warrant Officer (11,930 points)
useEffect(() => {
    if (window.innerWidth < 576) {
      setSrc('finish/sto/4.png?=%%CACHEBUSTER%%');
    } else if (window.innerWidth < 768) {
      setSrc('finish/sto/4.png?=%%CACHEBUSTER%%');
    } else if (window.innerWidth < 1200) {
      setSrc('finish/sto/4.png?=%%CACHEBUSTER%%');
    }
  }, []);

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...