View Single Post
Old 03-07-2016, 02:34 PM  
PornWorx
Confirmed User
 
Industry Role:
Join Date: Apr 2015
Posts: 235
Quote:
Originally Posted by SplatterMaster View Post
Do you build mobile first or desktop down? If you're just hiding divs doesn't the content load anyways causing mobile to load unnecessary content and using more bandwidth?

I never really liked mobile first to be honest. I know it's pushed hard on developers but I guess I am still old-school and like making the full width first. It's really just personal preference and the end result is what matters. As for loading unnecessary content you can optimize this in many ways. For images for example you could have two versions. One for mobile and one for desktop. Have javascript detect if it is mobile and serve that image. There are free scripts to use for this. Browsers are pretty smart now and usually will not load an image that is in a hidden div. To make absolutely sure it won't load you can set the image as a background of that div and hide it. It will not load the asset. Google for more techniques if interested.
PornWorx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote