Stops on non-200 header #153

Closed
ghost opened this Issue Sep 13, 2012 · 2 comments

Projects

None yet

2 participants

@ghost
ghost commented Sep 13, 2012

This script is designed to download a raw copy of the CSS and include media-query specific styling. However this script does not support redirect headers (such as 301). If the page being loaded is http://www.domain.com/css/style.css which 301 redirects to http://domain.com/css/style.css, while the browser will show the css file correctly, this script will die silently.

Some help for the developer would be adding a console message:

window.console && console.log && console.log("Incorrect header supplied. Expected 200, "" + req.status + "" supplied"); return;

on line 287.

At least it becomes easier to track the error down.

Alternatively, follow 301 and 302 codes for 4 or 5 hops?

Collaborator

Noting this in the README

@jefflembeck jefflembeck added a commit that referenced this issue Nov 20, 2013
@jefflembeck jefflembeck Fix #153 d746969

I don't think this should have been closed. The chain is broken so all subsequent styles also won't load.

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