Grrr. I'm trying to update a js file, and I have, ...
# javascript
d
Grrr. I'm trying to update a js file, and I have, but I can't get the browser to see the updated version. I actually renamed the file on disk, so it's missing in in source control, but Chrome, Firefox and Edge all still act like it's there, the old version before I modified it. I'm sure I'm on the right server and workspace, since I modified one of the cfm files too, in a very obvious way, and I see that change. Very frustrating. Any suggestions? This is CF 2021 and IE.
p
just put
whatever.js?x=#createuuid()#
👍 1
so it always loads the newest version of the file
d
Doh, disregard. Same file name, different path. Oopsies...
And for the record, it already has a version number url param, couldnt figure out why that didn't matter.
p
Ahh yea usually just need to step away if you cant figure out in 15min or less and give your mind a restart
m
Patrick with the clutch rubber ducky move there 🙂
😎 1
j
Yeha, we do
whatever.js?v=#formatdatetime(now(), "yymmdd")#
so then in prod it's updated to the clients which is better than #createuuid()# because otherwise the file is fetched every time from the client browser. During dev, we just do hard-refreshes
p
In prod we utilize build numbers; uuid was a ref for dev environments.
j
Got it. That makes sense.
I'm curious what you use to build? For one of our sites, I made a powershell script for deploying to prod from our dev env - not the best practice.
p
Jenkins
👍 1