※This article (Japanese) is translated from Google (English).
After editing JavaScript, it is the action when not applied even if reloading the screen.
Use PHP as a method.
I think that it will be useful in environments other than PHP.
Basically, it is sufficient to give the yyyymmddhhmmss format by date, so it can be realized by the following.
1 |
<script type="text/javascript" src="<?php echo 'main.js?date='.date('YmdHis'); ?>"></script> |
The following is added to “main.js? Date =”.
date (‘YmdHis’) ⇒ 20190327234000
This is changed in seconds, so the latest version is applied whenever you reload the screen.
コメント