Force the browser to reload app.js after React npm run dev/watch/prod compile each time

{{-- Attach the last modify time to the app.js to avoid cache from the client's browser after make a change --}}

<scriptsrc="{{asset('js/app.js?t=' .date("Y-m-d-H:i:s", filemtime(public_path('js/app.js')))) }}"></script>

Leave a Reply

Your email address will not be published. Required fields are marked *