Skip to content

CompareCSS needs Content-Type set or @@iterate_diff fails in Firefox #115

Description

@seanupton

Firefox requires CSS resources to have a permitted mime type in Content-Type header; the CompareCSS view serves compare.css as text/plain. Firefox console messages indicate (on @@iterate_diff):

The stylesheet compare.css was not loaded because its MIME type, “text/plain”, is not “text/css”.

In the absence of converting this to a change to plone.app.iterate (to serve compare.css as a browser resource from iterate, not an interim view in CMFEditions), I'm documenting here this omission. I am working around this in my own projects by providing a subclass of this view in my site policy that sets the mime type to text/css in __call__.

(I would submit a PR here, but suspect that a change to iterate is a more appropriate solution to remove the need for the CompareCSS view — I may look at that when I can).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions