you just have an array where you put the resolutions and check if it's already loaded on every call.