Home › Forums › JavaScript › Conditional Script Loading › Reply To: Conditional Script Loading
September 16, 2015 at 7:58 pm
#208257
Participant
Shikkediel, that was my first thought as well, but kwerty specifically said “mobile phones”. Simply doing a screen size check will not load the js files on a desktop browser if scaled below, say 500px (normal px width to check for), as you probably already know. I guess it really depends on what they’re trying to do. That’s the only reason I suggested browser sniffing. Otherwise, yeah, it’s much easier to just check screen size.