Quote:
Originally Posted by SplatterMaster
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.