Use doc.URL instead of loc.href to reduce size