Hope you're doing well.
I've tried looking for similar questions on here and on google in general, but I couldn't find an answer to my question.
I'm fairly new to developing, and I'm currently developing a website for my first client. I'm using InMotion as my hosting service, and have set-up GitHub actions to automatically update the files on the server whenever I push new commits to the repo. The website gets updated just fine whenever I push any new commits, but the problem is that I have to hard reset the cache (Shift + F5) for some changes to take effect and show up, it appears to mostly happen with CSS changes, and I'm yet to catch the same issue with JavaScript changes.
I didn't have these issues when I was hosting this previously on netlify's free hosting service as a test, so I'm guessing there's something I need to do, that InMotion doesn't automatically do from their end?
This is obviously not ideal, as so many users are not aware of hard cache resets, and wouldn't have a reason to even think about doing it, as for all they know, this is how the website looks.
I found this question on StackOverflow, but it was asked 14 years ago, and I struggled to find a concrete answer.
Is there any JavaScript code I can use, to force the user's browser to clear or update the cache, upon them loading the website?
Any help is appreciated, and thank you in advance for taking the time to read this!