Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Empty resources should not be cached #1068

Description

@sligocki

Splitting this new issue off of discussion on Issue #1050:

From @jeffkaufman:

Simple test case: http://www.jefftk.com/simpler-include-css/

$ cat index.html 
<style>body {background: red}</style>
<link rel=stylesheet href="a.css" type="text/css"/>

$ cat a.css 
@import url(b.css) ;

$ cat b.css 
body {background: green}

@media screen and (min-width: 240px) {
  body {background: blue}
}

To get the failure:

  1. Pick a unique set of irrelevant PageSpeed query options to functionally clear the metadata cache. So ?PageSpeedFilters=+[something_silly].
  2. Open that URL in Chrome or FF, it should work, green screen.
  3. Open that URL in the other one, it shouldn't work, red screen.

On the passing side +debug gives me:

<style>@import url(support-files/rwd-v2.css) ;</style><!--Flattening failed:
A media query is too complex in http://www.jefftk.com/simple-include-css
/support-files/rwd-v2.css AND Cannot rewrite http://cfd.enjoy-swimming.
com/image-files-layout/rwd-header.png as it is on an unauthorized domain-->

On the failing side:

<style></style><!--Flattening failed: A media query is too complex in
http://www.jefftk.com/simple-include-css/support-files/rwd-v2.css-->

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions