Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Dec 2006
    Location
    Park City, Utah
    Posts
    318

    Default Refresh page message

    I have several large page websites that turn into a complete mess when I update a few images. I understand that this is due to the random naming of images xara exports.

    These pages get updated and visited often and visitors complain they can't make sense of the site sometimes. I probably should have created this with another software.

    My question is: Is there something I could add to the page that prompt the visitor to refresh the page if it does not look right?
    Ideally this message would stay on for a few seconds and then vanish. Any suggestions to make this sleek would be appreciated.

    Until xara is able to name images I think this would work for me. Creating placeholder for 100s of tiny pngs and jpgs will be too much work.

    Thanks i advance.

    Tom

  2. #2
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,918

    Default Re: Refresh page message

    A quick look around the internet would suggest that you force the site to be uploaded from the server each time rather than the local cache. Try adding this to your head section (via a head place holder of course):

    Code:
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    <META HTTP-EQUIV="Pragma-directive" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Directive" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="0">
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  3. #3
    Join Date
    Oct 2007
    Location
    Richmond, MI USA
    Posts
    1,221

    Default Re: Refresh page message

    Egg,
    I've used this no cache script successfully, but when I look at the source code in the browser, it's placed in the <head> area multiple times. One one page it's listed 11 times, some pages 5 times, others 2 times. Any ideas why this is happening?
    Here's a link to a temp page with it listed 11 times: http://www.michiganimaging.com/mychoice/residential.htm

    Jim

  4. #4
    Join Date
    Oct 2007
    Location
    Richmond, MI USA
    Posts
    1,221

    Default Re: Refresh page message

    Egg,
    I also use a script to force a scroll bar:

    <style type="text/css">
    html { min-height: 101%; } </style>

    If I remove this it removes the multiple instances of the no cache. Any suggestions?

    Jim

  5. #5
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,918

    Default Re: Refresh page message

    All code for the head section should be in the one placeholder. For example you mustn't have 2 head placeholders on the same page. Check this first and get back.
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  6. #6
    Join Date
    Oct 2007
    Location
    Richmond, MI USA
    Posts
    1,221

    Default Re: Refresh page message

    egg,
    I thought of that, I had tried it but it didn't seem to make any difference. I just now tried it again changing the order in case that made a difference, and it worked. Don't know if I just didn't do it correctly before or what, but it works. I like the no cache script for testing but don't think I would use it in the final project as it might slow down loading. I have a client that I'm showing pages in progress, and he keeps mentioning files out of place, or rollovers that don't match. I tell him again "F5" and it reloads and now he sees it correctly. Using this script stopped that. Thanks.

    Jim

  7. #7
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,918

    Default Re: Refresh page message

    Cheers Jim, it wasn't my code, I just found it on the net. Agree regarding the problems with leaving it in permanently.
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  8. #8
    Join Date
    Dec 2006
    Location
    Park City, Utah
    Posts
    318

    Default Re: Refresh page message

    Quote Originally Posted by jimhanus View Post
    egg,
    I thought of that, I had tried it but it didn't seem to make any difference. I just now tried it again changing the order in case that made a difference, and it worked. Don't know if I just didn't do it correctly before or what, but it works. I like the no cache script for testing but don't think I would use it in the final project as it might slow down loading. I have a client that I'm showing pages in progress, and he keeps mentioning files out of place, or rollovers that don't match. I tell him again "F5" and it reloads and now he sees it correctly. Using this script stopped that. Thanks.

    Jim
    This is exactly why I like this code too. I keep showing the site with changes to the site owner and he now no longer complain about the graphics going crazy on him. I will not use the code later since the pages are quite heavy on graphics.

    Tom

  9. #9
    Join Date
    Jan 2010
    Location
    Dublin, Ireland
    Posts
    10

    Default Re: Refresh page message

    I have had alot of trouble regarding the caching problem caused by
    how Web Designer/Xtreme names the graphic files (0.png, 1.png, 2.png...etc)

    This causes a problem whereby when graphical changes are made to a website and uploaded, the browser calls the old cached images into the new design giving very strange results.

    The code below seems to resolve the problem for me.

    You save it as the index.html file in the normal root of your server.
    You then upload your Xara Website to a folder you create within that space (let's call it "foldername1")

    This index file prevents the page from being cached and redirects the index to read the website from the "foldername1"

    If you modify the website you can create a new folder "foldername2" and upload your complete website to this location.

    Simply change the URL in the code below to point at this new folder.



    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD>
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="-1">
    </HEAD><BODY>
    <title>Your Page Title</title>
    <meta http-equiv="REFRESH" content="0;url=http://www.yourwebsite.com/foldername1"></HEAD>
    <BODY>
    </BODY>
    <HEAD>
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    </HEAD>
    </HTML>

    I am currently working on a highly graphical website that has had multiple changes made and uploaded. By adjusted the redirect and uploading to a new folder I have been able to show the design to the client without the problems.

    http://www.paintbox.ie/wilton2010

  10. #10
    Join Date
    Oct 2007
    Location
    Richmond, MI USA
    Posts
    1,221

    Default Re: Refresh page message

    jrpaintbox,
    I know you said this resolves the problem for you, but can you explain why you chose to do it that way as opposed to Egg's method:

    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    <META HTTP-EQUIV="Pragma-directive" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Directive" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="0">

    I'm no expert so, I'm wondering do they both achieve the same end result, or is there a reason to chose one method over the other?

    Jim

 

 

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
  •