https dev server does not use browser cache
liuweiGL opened this issue · 6 comments
Describe the bug
https dev server does not use browser cache
http dev server
http request detail
- The resource with
Cache-Control: no-cache
- The resource with
Cache-Control: max-age=3153
https dev server
https request detail
- The resource with
Cache-Control: no-cache
- The resource with
Cache-Control: max-age=3153
Reproduction
System Info
Output of npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz
Memory: 10.20 GB / 19.92 GB
Binaries:
Node: 14.15.5 - D:\nodejs\node.EXE
npm: 7.7.5 - D:\nodejs\npm.CMD
Browsers:
Edge: 44.19041.423.0
Chrome: 89.0.4389.90
Used package manager: npm
Logs
Before submitting the issue, please make sure you do the following
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Provide a description in this issue that describes the bug.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
This is caused by https certificate errors: Cache problems on Chrome with SSL certificate errors
Can vite integrate https-localhost ?
Can vite integrate https-localhost ?
Vite currently regenerates (on npm run dev
) the self-signed certificate so it can never be added to a trusted root certificate store. It would be really nice to be able to link to or even in a more automated matter. This would also clear up the annoying prompts you get in Chrome/Edge when initially starting the server.
I will write a vite-cert
plugin to to it.
@liuweiGL Is there somewhere I can follow progress on vite-cert
?