simple bytes extraction from resources using xhr