Results 1 to 3 of 3

Thread: Cache a dynamicaly generated menu ( from dir structure)

  1. #1
    Join Date
    Mar 2009
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Cache a dynamicaly generated menu ( from dir structure)

    Hi all,
    I have created a tree menu that is dynamically loaded from the directory structure on my web server. Because it takes a while to load, I was wondering if there is any way to cache the menu so that the browser doesn't have to load it again and again.

    My idea is to cache it twice a day maybe (to keep up to date as it is accessing the report). Does any one know a way of doing it?

    Regards,

    Sameer.

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    unless you've set the server to not do so, the browser by default will cache the page

  3. #3
    Join Date
    May 2009
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Maybe you can try using the PHP to create a Javascript file on-the-fly. Twice a day you will have new versions of that .js file. So when people go to your site on different pages, they will still loading that .js file, and it will be cached. Saving the loading time for the script if you have it in-lined.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •