question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

https dev server does not use browser cache

See original GitHub issue

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

  • 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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
liuweiGLcommented, Mar 30, 2021

I’m about to begin:vite-cert 😄

2reactions
liuweiGLcommented, Mar 27, 2021

Can vite integrate https-localhost ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Caching not working in HTTPS - Stack Overflow
So the problem is that your client is not sending the correct request, perhaps, your client does not use cached content from http...
Read more >
Prevent unnecessary network requests with the HTTP Cache
How can you avoid unnecessary network requests? The browser's HTTP Cache is your first line of defense. It's not necessarily the most ...
Read more >
Disable Caching During Development with Browser Tools
Under Advanced Settings select Disable Cache (while toolbox is open). Similar to Chrome, Firefox only disables caching while the developer tools ...
Read more >
A Web Developer's Guide to Browser Caching - Medium
In this article, we'll explain the how the browser uses its cache to load pages ... The browser won't have any files cached...
Read more >
Cache-Control - HTTP - MDN Web Docs
The no-cache response directive indicates that the response can be stored in caches, but the response must be validated with the origin server ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found