Does anybody know if there is a fix/workaround for Safari so it doesn't cache everything so hard. I'm solving a specific Safari bug and I have to empty the cache for each change I do. They removed the "disable cache" option so I'm wondering what you guys do.
-
Cmd/Opt/R not clearing enough?– TetsujinApr 6, 2022 at 11:42
-
1@Tetsujin it does but it's not what I'm looking for. Developing frontend with Vite/Webpack it does "hot reloading" meaning it changes parts that has changed without reload, so to have to do Cmd/Opt/R defeats the purpose of it and slows down development.– Dejan.SApr 6, 2022 at 11:59
-
Just explicitly reload your css by visiting its URL– lhfApr 6, 2022 at 12:33
-
@lhf it's the same as reloading with cmd/opt/r and kinda defeats the purpose of "hot reloading"? In chrome you can disable it, same as Safari had before.– Dejan.SApr 6, 2022 at 12:57
-
Does private browsing not disable caching?– HarvApr 12, 2022 at 17:48
1 Answer
I found this article that covers disabling cache when developing in Safari.
I'm on Safari v15.2. Don't quote me on this but I think it covers v14 as well.
- Menu > select "Connect Web Inspector"
- Network tab
- There is now a icon button with a line cut through it (turns blue when active)
Images from the article