Bug #16049

#1 Updated by geb 2018-10-13 12:48:26

As far as I understand it :

- Some static content is actually pushed to the client HTTP headers allowing one week of caching :

curl -v https://tails.boum.org/local.css > /dev/null
[...]
< Last-Modified: Sat, 13 Oct 2018 01:52:22 GMT
< Cache-Control: max-age=604800
< Expires: Sat, 20 Oct 2018 12:41:10 GMT

- The is no Cache-Control: must-revalidate header
- So the clients may use old version of those files for up to one week, without revalidating them.

Thus

- I am not sure there any way to actually force the clients to refresh stale content, without Control+r

- Adding a Cache-Control: must-revalidate header may help for next updates
- Meanwhile putting the changes in another css file, loading it in the index.html could solve the problem, as there is a max-cache: 0 for index.html, it will always be refreshed.

#2 Updated by CyrilBrulebois 2018-10-13 17:10:28

Thanks for the heads-up. You’ll find a screenshot attached, which I’ve taken with my Firefox that indeed knows about tails.boum.org; opening it in a fresh browser doesn’t lead to this issue.

It looks to me the immediate “let’s use another CSS file name, that wasn’t cached yet” would be a good interim measure indeed.

#3 Updated by geb 2018-10-13 19:05:59

  • Subject changed from Donation banner maybe badly displayed because of HTTP caching to Donation banner may be badly displayed because of HTTP caching

#4 Updated by intrigeri 2018-10-15 10:55:39

  • Assignee set to sajolida

#5 Updated by sajolida 2018-10-15 19:15:39

  • Status changed from New to Confirmed
  • Assignee changed from sajolida to intrigeri
  • QA Check set to Ready for QA
  • Feature Branch set to web/16049-avoid-cached-local-css

Oops, thanks a lot for the heads up!

Here is a commit that we could merged right-now and revert in some days.

I’m assigning to intrigeri who has commit permissions. He also knows more about HTTP caching than me and could check how we could prevent this from happening again once we self-host our website.

If you’re happy with my dirty fix and apply it, please reassing this ticket to me so I remember to revert it in a week or so.

#6 Updated by intrigeri 2018-10-15 19:30:40

  • Priority changed from Elevated to High
  • Target version set to Tails_3.10.1

#7 Updated by sajolida 2018-10-15 19:41:16

  • Description updated

#8 Updated by intrigeri 2018-10-16 08:35:53

sajolida wrote:
> Here is a commit that we could merged right-now and revert in some days.

I’ve amended this commit to update the 2 other places that use local.css. Sadly, the branch (and any other branch forked off master) won’t build due to Bug #15936 having been merged into stable, until 3.10 is released, so I’ll try to build a branch that locally merges this into stable.

> I’m assigning to intrigeri who has commit permissions. He also knows more about HTTP caching than me and could check how we could prevent this from happening again once we self-host our website.

Good idea, added a note about this on Feature #14588 so I don’t forget about it.

> If you’re happy with my dirty fix and apply it, please reassing this ticket to me so I remember to revert it in a week or so.

Will do once I’ve applied the fix. To be safe, better revert 7+ full days after the new CSS was pushed.

#9 Updated by intrigeri 2018-10-16 08:40:42

  • Status changed from Confirmed to In Progress

#10 Updated by intrigeri 2018-10-16 11:54:23

  • Assignee changed from intrigeri to sajolida
  • QA Check changed from Ready for QA to Dev Needed

Merging! (That will rebuild the full web site, which will take a while.)

#11 Updated by sajolida 2018-10-21 20:20:32

  • Target version changed from Tails_3.10.1 to Tails_3.11

That’s right after 3.10.

#12 Updated by sajolida 2018-11-06 09:16:19

  • Status changed from In Progress to Resolved
  • Assignee deleted (sajolida)
  • Parent task set to Feature #14877
  • QA Check deleted (Dev Needed)

I reverted renaming the file in 923165ff09 and I’m pushing now.

In the future we should use Ulrike’s URL query technique instead. See 4e30a3e59b.