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

Client reload doesn't work out-the-box in Chomium #1221

Open
faustinoaq opened this issue Jul 5, 2020 · 4 comments
Open

Client reload doesn't work out-the-box in Chomium #1221

faustinoaq opened this issue Jul 5, 2020 · 4 comments

Comments

@faustinoaq
Copy link
Contributor

Description

Chromium Browser doesn't update the code changes in main.js or main.scss

Steps to Reproduce

  1. amber watch
  2. Open http://0.0.0.0:3000/ in Chromium Browser
  3. Change $primary in main.scss
  4. See triggered reload in Chromium Browser

Expected behavior: color changes

Actual behavior: colors doesn't change

Reproduces how often: 100%

Versions

$ shards --version
Shards 0.10.0 (2020-05-03)
$ crystal -v
Crystal 0.35.0 (2020-06-09)

LLVM: 10.0.0
Default target: x86_64-pc-linux-gnu
$ amber --version
Amber CLI (amberframework.org) - v0.35.0
$ npm -v
6.14.5
$ node -v
v14.3.0
$ lsb_release -a
LSB Version:    n/a
Distributor ID: ManjaroLinux
Description:    Manjaro Linux
Release:        20.0.3
Codename:       Lysia

Additional Information

The issue goes away when I check the option Disable cache (when DevTools is open)

image

I opened this issue to confirm Is this the right workaround or should I change some cache settings in my app?

Happy Crystalling! ❤️ 😎

@eliasjpr
Copy link
Contributor

eliasjpr commented Aug 5, 2020

@faustinoaq do you think you can take a look at this?

@midhun-at-vineti
Copy link

Looks like this has to do with how Chromium and Chrome behave on 'Cache-Control' header, which is set by pipes/static.cr to private, max-age=3600.

I tried reproducing this in Chrome but Chrome for some reason doesn't cache the main.bundle.css file but Chromium caches it and is reproducible.

@eliasjpr @faustinoaq Do you think it would be a good idea to make the static response headers configurable? Would be happy to create a PR.

@eliasjpr
Copy link
Contributor

eliasjpr commented Sep 3, 2020

@midhun-at-vineti Yes lets make those headers configurable if possible have some default for Chromium

@midhun-at-vineti
Copy link

@eliasjpr on it. 👍

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

No branches or pull requests

3 participants