Bug 9522

Summary: Documentation isn't cachable
Product: [Infrastructure] Website Reporter: Ross Burton <ross.burton>
Component: web-structureAssignee: Michael Halstead <mhalstead>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: jefro, mhalstead, sgw
Version: unspecified   
Target Milestone: Future   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2016-04-26 13:47:04 UTC
The documentation, for example http://www.yoctoproject.org/docs/2.0.1/mega-manual/mega-manual.html, isn't cachable by either Chrome or Safari on my laptop.

Network tracing shows that whilst all the content - the images, stylesheet and so on - are all HTTP 304'd so the local cache is used, mega-manual.html is always returned entirely instead of being cached.
Comment 1 Michael Halstead 2016-05-12 17:20:42 UTC
We add Google Analytics during page generation for all of the .html files in the documentation. This updates the last-modified header and prevents the response from being cached.

There are a few ways to fix it:
  rebuild the webserver to support keeping the last-modified header static
  add the GA code to the static doc files after they are generated
  stop tracking how our docs are accessed

I'll pursue the first option since we don't lose anything and I don't interfere with Scott's workflow that way.
Comment 2 Jeff Osier-Mixon 2017-06-20 21:23:14 UTC
we are making changes to the website - wanted to make sure to watch this to make sure we implement it in the new world order
Comment 3 Michael Halstead 2018-11-09 15:56:48 UTC
This was resolved by the web server moves in March.

Seeing 304 for the main manual now and "200 OK (from memory cache)" for the other assets.