Conditional resource loader for web browsers