search

Home  >  Q&A  >  body text

如何给静态html 引用的js或者css路径后面加上时间戳?

10.png

图上,每次进来都在引用路径后面添加时间戳,去除客户端的缓存

城堡下的诡洞城堡下的诡洞2817 days ago1643

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-10-01 00:45:27

    How to add a timestamp to the end of the js or css path referenced by static html? -PHP Chinese website Q&A-How to add a timestamp to the end of the js or css path referenced by static html? -PHP Chinese website Q&A

    Let’s take a look and learn.

    reply
    0
  • 迷茫

    迷茫2017-03-09 09:17:42

    document.write('<link rel="stylesheet" href="index.css?time='+new Date().getTime()+'">');

    reply
    0
  • Cancelreply