Forums

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
    Posts
  • #138729
    lizandrol
    Member

    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.

    #138784
    Alen
    Participant

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

    If you’re using PHP there is: http://mobiledetect.net/

    #199941
    bigjim847
    Participant

    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.