Skip to content
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

https dev server does not use browser cache #2725

Closed
6 tasks done
liuweiGL opened this issue Mar 27, 2021 · 6 comments · Fixed by liuweiGL/vite-plugin-mkcert#1
Closed
6 tasks done

https dev server does not use browser cache #2725

liuweiGL opened this issue Mar 27, 2021 · 6 comments · Fixed by liuweiGL/vite-plugin-mkcert#1

Comments

@liuweiGL
Copy link
Contributor

liuweiGL commented Mar 27, 2021

Describe the bug

https dev server does not use browser cache

http dev server

http

http request detail

  1. The resource with Cache-Control: no-cache

tree_picker_first_request
tree_picker_first_request_detail
tree_picker_second_request
tree_picker_second_request_detail

  1. The resource with Cache-Control: max-age=3153

layout_first_request
layout_first_request_detail
layout_second_request
layout_second_request_detail

https dev server

https

https request detail

  1. The resource with Cache-Control: no-cache

tree_picker_first_request
tree_picker_first_request_detail
6000,immutable`
tree_picker_second_request
tree_picker_second_request_detail

  1. The resource with Cache-Control: max-age=3153

layout_first_request
layout_first_request_detail
layout_second_request
layout_second_request_detail

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

@liuweiGL
Copy link
Contributor Author

liuweiGL commented Mar 27, 2021

This is caused by https certificate errors: Cache problems on Chrome with SSL certificate errors

@liuweiGL
Copy link
Contributor Author

liuweiGL commented Mar 27, 2021

Can vite integrate https-localhost ?

@hanneswidrig
Copy link

hanneswidrig commented Mar 29, 2021

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.

@liuweiGL
Copy link
Contributor Author

I will write a vite-cert plugin to to it.

@hanneswidrig
Copy link

hanneswidrig commented Mar 30, 2021

@liuweiGL Is there somewhere I can follow progress on vite-cert?

@liuweiGL
Copy link
Contributor Author

I'm about to begin:vite-cert 😄

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants