The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Mobile Device Trick

  • This topic is empty.
Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
  • #138729

    I’m just wondering about showing some content or not depending om the device. I mean that some content of the the webpage should not be shown if movile device. This is in order to make it lighter for movile devices.


    What server side scripting language are you using? PHP? or is this in plain HTML?

    If you’re using PHP there is:


    You can prevent images from loading but you would have to use scripting to remove the images from the page before they load. Hiding them does not do this. It simply prevents them from being displayed.

    If you want some images removed but not all, apply a unique class to those images and have the Javascript remove them from the DOM before they are loaded. Otherwise, you can have all images stripped out.

    Another popular technique swaps mobile-optimized versions for each image whenever a mobile device loads the page.

Viewing 3 posts - 16 through 18 (of 18 total)
  • The forum ‘CSS’ is closed to new topics and replies.