Caching Menu and other repetive elements

Discussion in 'HTML & Website Design' started by neha2011, Jul 19, 2011.

  1. #1
    It struck me today, if I have a menu inserted by <?php include> it is fetched from server each time the page or subpage loads, right? In the times of old <frameset> menu was loaded once and only the content pane of site changed. Having arrived at menu that is 3 times the content size itself and growing I begin to ask myself if <frameset> or <iframe> wasn't more bandwidth efficient. What would be the way to cache menu on client side, yet avoid all the inconveniences of frames like inability to link to subpages? I read about <object> tag that could be used to "include" menu on client side, but will it be then kept in cache or discarded each time new subpage loads?
    Or maybe there is a way to tell the browser that it can keep this piece of code because it's the same on every page?

    Any suggestions would be appreciated.
     
    neha2011, Jul 19, 2011 IP
  2. oltranzista

    oltranzista Peon

    Messages:
    34
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I would suggest to stay away from frameset. Have a look PHP's APC features for server side stuff. Then for client side stuff have a look at yahoo's yslow addon for Firefox then it will rate your site on loading and also recommend ways to speed it up.
     
    oltranzista, Jul 20, 2011 IP