SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2002
    Location
    Penns Woods
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Loading Images Once

    I'm trying to make sure some images are preloaded no matter which page on the site a person hits first... without Redirecting to another page. It seems to me this would be done with a Flag. But, I think it would be passed in the Address bar, so if the page gets added to Favorites it will have the Flag info with it- thereby skipping the preload on their return by way of Favorites.

    I haven't tried it yet, but so far I've come up with putting this line at the bottom of the preloader page...
    PHP Code:
    <?php $opener="yep"?>
    Then put this on every page...
    PHP Code:
    <?php
    if(isset($opener)){
    include(
    "$PHP_SELF?");
    }else{
    include(
    "./preloader.php");
    include(
    "$PHP_SELF?");
    }
    ?>
    Does this look ok?
    TIA for your comments and suggestions.
    Last edited by tryangle; Sep 11, 2002 at 10:47.
    // PS! My brain just hit a bad sector...

  2. #2
    SitePoint Enthusiast
    Join Date
    Jul 2002
    Location
    Penns Woods
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What would this be called?

    It's not Redirection, because I'm not trying to send people to another website... but it involves sending them to "another page" temporarily- but only if the images haven't been preloaded.

    The images are available (as menu rollovers) on every page, except I don't want to preload them on every page. I was wondering if I could pass a variable through the address bar if the images have been loaded, but then if a person returns directly to a page- other than index.php (via Favorites) I think the Flag and everything would get saved along with the address. Then upon return, the images wouldn't be preloaded. How can I workaround that?

    Thanks...
    // PS! My brain just hit a bad sector...


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
  •