Using different CSS if a user has slow internet?

Discussion in 'CSS' started by BannanoPeel, Feb 2, 2011.

  1. #1
    I would like to let visitors have the ability to click on a link at the top of my website so that they can view it in a different style that would be much less bandwidth intense.

    I am pretty sure that this is a pretty easy thing to do, but I'm not sure how. If at all possible I would like the URL's to stay the same.

    Does anyone have any advice? The best thing I can relate it to is a website that can render so that smartphones can view it easily.

    Thanks
     
    BannanoPeel, Feb 2, 2011 IP
  2. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Well you can add media=handheld for the attached stylesheet which will have styles to fit the layout on handheld device.

    
    <link rel="stylesheet" href="..." type="text/css" media="handheld">
    
    Code (markup):
     
    radiant_luv, Feb 2, 2011 IP
  3. srisen2

    srisen2 Peon

    Messages:
    359
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    you would most likley want to just use a link that would redirect the the same page and then have php process a get variable to switch the style sheet out based on if the link has been clicked or not. If you would like this to stick for each page you would then need to convert this into a session variable and have it process all the same.
     
    srisen2, Feb 3, 2011 IP