Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Bret Williams on May 4, 2005 at 12:26 am

    It seems that a recent update of safari has introduced new behaviour. A little trick I use is to have an image at the head of each page that is different from section to section. I create a template page, in which the file path is simply menuimage.jpg instead of ../menuimage.jpg or /menuimage.jpg, etc. Each section has it’s own directory, with a menuimage.jpg file. So no need to change file paths or image names as I create new pages from the template.

    Here’s the weird part – I’ve been making the image a background image of a table so that I can then put text in front, the title of the page, which is actually drawn from a php included text file same way.

    So, on a new site, hownet.lunarpages.net/retail – it doesn’t update. It sticks with the retail image if you start in that directory. If you start in another directory it stays with that image. You can even directly load the menuimage.jpg file of your choice and refresh, empty the cache, etc., but Safari will not refresh the background table image.

    Other browsers I’ve checked are Firewfox and IE Mac 5.5. Both work perfectly. Safari is the only browser with the issue If I change the image from background to a regular cell image, it works and updates perfectly. So I checked an older site that used to work, and it too now doesn’t update.

    If you check the source code you can see the image it’s calling for, but that isn’t the image displayed. Argh. Is there a solution? I’ve notified the Safari folks.

    Other examples…
    Using a foreground image works fine at joanproduces.com/porfolio, but using a background image doesn’t at harrylegum.com/about

    Bret Williams replied 19 years, 8 months ago 2 Members · 8 Replies
  • 8 Replies
  • Curtis Thompson

    May 5, 2005 at 3:58 pm

    hello…

    ya – that’s an odd one! i think the easy way around it would be to make the background image url include the relative path – so instead of BACKGROUND=”menuimage.jpg”, try BACKGROUND=”/path/to/menuimage.jpg” – then safari might recognize them as different images…

    sitruc

  • Bret Williams

    May 6, 2005 at 3:49 am

    Except that would defeat the entire purpose of the template. The page also has an include for the menu that is the same path and that works fine. Maybe I can do an include for the background and that will force the update.

  • Curtis Thompson

    May 6, 2005 at 3:54 am

    hello…

    not really – there are a mess of server variables that you can use like SCRIPT_NAME, REQUEST_URI, etc…you can grab them all with getenv:

    https://us4.php.net/getenv

    try making a page with phpinfo() to see all the environment variables that you can use…there is likely a path in there that you can make use of as a url path there so that you won’t have to change it between templates…

    sitruc

  • Bret Williams

    May 6, 2005 at 4:30 am

    I only have one template. All the pages are the same template. But the menu and the masthead images are an immediate file path. So it’s looking for each in whatever folder I save the page(s) to. So say I have a section on about us, there is a folder called about with a file in it called menuimage.jpg and menu.html. So simple. Works great. Until safari introduced this bug. And it’s not a refresh or caching issue. I can actually navigate directly to the iamge file adn safari shows it. Then you’d figure that I could go back to the page and it would have refreshed that image – a common IE error – but it doesn’t. It doesn’t even know that it should refresh.

    They’ll probably fix it, and all of probably 2% of the folks out there are using safari anyway.

  • Curtis Thompson

    May 6, 2005 at 5:07 am

    hello…

    ok – another angle…somewhere in this process you have a variable or a case switch or an if/else or something to decide which template to show – so how about puting that variable name as part of the image file name or setting a variable to use or something?

    there are ways to get around this in your code. trust me…i just can’t see your code, though, so i can’t say which ones would work for you in this specific case…

    sitruc

  • Bret Williams

    May 6, 2005 at 7:22 pm

    No variables anywhere. I think you’re confusing php templates with Dreamweaver templates. Which I’m using. Sorry to confuse.

  • Curtis Thompson

    May 6, 2005 at 9:23 pm

    hello…

    never used dreamweaver in my life, so it’s a safe bet i’m not confusing them with those… 🙂

    i call them templates, but i assume that you have some sort of functionality that determines which header bit and image to show, yes? how do you do that?

    sitruc

  • Bret Williams

    May 7, 2005 at 4:10 am

    No. A dreamweaver template file is nothing more than a regular old html file, with some specific note tags that only mean anything to dreamweaver.

    Example, before the head…

    Templates have edtable regions. Defined by note tags that just say begin editable, end editable. Example…

    So, if I change the dreamweaver .dwt file, DW asks if I’d like to update the 50 or so pages that are based on that template. It changes the files in a matter of seconds and I then upload updated files.

    So, by making some of the links point to a file that doesn’t actually exist in the template folder, DW doesn’t automatically update the link (the menuimage.jpg link) automatically, and I can mange scripted like funcitons without any scripting. The template calls for menu.jpg no matter what directory the page based on the template resides in. One template, and a different look and title, which is an include function drawing the title from a simple .txt file in the same way. All pages in that directory have a certain main title, and a certain background image. If I move the page to another directory all the links update automatically, and the title and background image automatically change.

    Anyway, it appears that Safari 1.3 is a dog. Fixes lots of bugs, but introduces huge new ones. I’ve also found issues with toggling an id class visibility on and off. Firefox is the only way to go for now, and it’s CSS support has always stunk imho.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy