-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Safari cache on dev #5860
Comments
I can't reproduce this issue, tried on codesandbox: https://codesandbox.io/s/l2zqw773kz |
@timneutkens It's definitely an issue, I can repro it too. |
CodeSandbox is not really an accurate reproduction of how people run development mode. For example, clearly CodeSandbox is running everything through some kind of HTTPS proxy, because that hello world page is served over HTTPS right? But the dev server you get when you run |
I did some experiments and here's what I found:
This is most likely an issue with Safari's I was actually able to reproduce it on CodeSandbox too, so there did not end up being a difference there. Potentially relevant bug: https://bugs.webkit.org/show_bug.cgi?id=187726 |
Interesting, so let's re-open this, I guess we could drop the preload tags in development 🤔 |
Script and link element must definitely have the same |
@cramforce so by default Next.js won't add I just noticed that for error pages we set a different Potentially implementing that for dev assets would make sense 🤔 |
@timneutkens Maybe switch from the header to a per page-load random value as part of the URL. Would also defend against overzealous ServiceWorkers. |
@timneutkens When I was experimenting with this I actually tried changing that exact line with all manner of caching headers including |
Looks like it started to work after I add ?date=Date.now() to page links in Next sources. |
Still having this issue also. Not being able to use Safari for development is a real bummer. |
I am having the same issue with my Safari. Workaround which works for me is: |
I'm seeing this today with Safari 13.0.4 and Next.js 9.1.7. |
Due to this issue during the current service development, the layout is broken due to the issue that js is called earlier than css in the external layout module. Could you add a next config that can turn off preloading of the js file of the head? This is currently a problem in safari. I'm use nextjs version 10.0.5 |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
The context
Safari 12.0.1
nextjs in dev mode
/pages/index.js with simplest react code:
Behaviour
The text was updated successfully, but these errors were encountered: