Right now I'm having to change a js file more often than not. cache problems on half the users. Next solution, to add a
?v=x
behind. Sure, why not. But of course I almost always forgot to change that number as well.
So I came up with this solution.
<script src="js/main.js?v=<?php echo md5_file('js/main.js'); ?>"></script>
Is md5_file too expensive? Right now it's working like a charm but I don't really know if on bigger websites this would be very bad for the server.
Any thoughts or alternative solutions?