Modify decideresource() and favicon handling