marcelduran/yslow — pull request #65 by brewt (2013-01-31 21:24:48+00:00)
Title: Location header fix; add YSlow version to beacon; valid protocols check

A couple patches that we've integrated into our YSlow code for GTmetrix:

**Location header fix**

Some sites have a Location header that points to itself. Firefox is smart enough to not follow the redirect, but YSlow doesn't handle it properly.

**Add YSlow version to beacon**

I don't think YSlow rules have changed much in a while, but I think it's important to save the YSlow version with the beacon data. It adds the version in as the 'v' parameter.

**Valid protocols check**

I'm not 100% on this one, but it's worked for us. YSlow gets stuck when there are resources on the page which use certain protocols (eg. file://, mms://). I've switched YSLOW.ComponentSet.isValidProtocol() to check against a small list of protocols that Firefox will work with (http, https, ftp). Not sure if other protocols should be added to the list or not.