Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

caching when running yarn dev: livereload continues to reload page but same content is "stuck" #130

Open
insidewhy opened this issue May 12, 2020 · 7 comments

Comments

@insidewhy
Copy link

insidewhy commented May 12, 2020

Using chromium on archlinux, I've been developing an app for a week now.

However this scenario keeps happening frequently: I'm developing and there's a bug in my code. I keep changing the code to try to fix the bug and the page keep reloading but nothing changes. I get confused and frustrated and then I realise that even though the page is reloading, it's not reloading any of my source code changes. Despite the "reload", it's just continuously reloading a version of the code it's stuck on.

The only way to get it to see my changes is to close the browser window and reopen it.

It's gotten to the point where I've gotten paranoid about my svelte app. Whenever there's a bug I keep closing the window and opening a new one because I can't trust what I'm seeing. It leads me to feeling really negatively about the development experience.

@insidewhy
Copy link
Author

I wonder if sirv is missing some headers to stop chromium from caching the page?

@insidewhy
Copy link
Author

insidewhy commented May 12, 2020

Sometimes shutting and reopening the window doesn't work either. I've reloaded my browser several times and the page just won't update :( I had to hold down shift and hit reload this time, there's definitely some caching issues going on here.

@insidewhy insidewhy changed the title livereload continues to reload page but same content is "stuck" until browser window is closed and reopened caching when running yarn dev: livereload continues to reload page but same content is "stuck" May 12, 2020
@AmmonStretz
Copy link

I have the same Issue. It worked fine the most of the time. The first time it helped to restart the computer. But not anymore.

@insidewhy
Copy link
Author

insidewhy commented May 21, 2020

@AmmonStretz It's so annoying right? Not being able to trust what you're seeing. Every single time there's a bug now I don't know if I've already fixed it or not.It's so frustrating I'm regretting not going with Vue 3 beta instead of Svelte haha.

@antony
Copy link
Member

antony commented May 21, 2020

Is there a small repro app and a few steps I can do to replicate the issue?

@insidewhy
Copy link
Author

insidewhy commented May 21, 2020

@antony There's no real way to reproduce it in a few steps, just develop for a few hours in any project and eventually it'll get stuck. I think sirv --dev just isn't using the right headers to stop browsers caching.

@antony
Copy link
Member

antony commented May 21, 2020

I've been developing with Sapper for years and I've never seen this. I wonder what the difference in headers is.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants