html noobie help please

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by coningsb, Aug 6, 2014.

  1. coningsb

    coningsb New Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    hi all ive made a website http://www.coningsbypool.x10.mx/ (thanks for the free hosting ! )

    but after ive updated it, via dreamweaver, i have to click refresh to be able to see the update, (so do other people)
    ive used the meta tags in the head
    Code:
     
               <meta http-equiv="pragma" content="no-cache" />
                <meta http-equiv="expires" content="-1" />
    
    but i still have to hit refresh to get the updated site

    as its all self taught off utube please be gental with me !

    Thanks
     
  2. essellar

    essellar Community Advocate Community Support

    Messages:
    3,295
    Likes Received:
    227
    Trophy Points:
    63
    What are you updating? The CSS and images will not be affected by the cache setting on the page; each of those files has its own cache setting. (Nor are <meta> tags a substitute for actual HTTP headers, for that matter; if there is an ISP proxy between you and your x10Hosting server, it won't necessarily parse the HTML to find out that it shouldn't be caching the page if the HTTP headers tell it that there's no good reason why it can't be cached. It doesn't matter what your browser is requesting if the ISP's servers say "Ooh, I've got a copy of that that can save us a lot of bandwidth!!!") You can alter the HTTP header cache settings by changing your .htaccess file. (There are a bunch of tutorials out there for it; look for something that explains it clearly to you, since they're all at varying levels of "assume X technical knowledge", form n00b to guru.)

    Best practice for CSS and JavaScript files is to use version numbers (or dates, or what have you) as part of the file name. If you allow them to be aggressively cached, your site's apparent performance will improve dramatically, but it remains easy to change the look and behaviour of the site by changing the requested file name. (That, of course, assumes that there isn't much to change on the HTML side. Both Server-Side Includes and dynamic languages, such as PHP, as well as static page compilers, mean that you only have to change one or two files rather than large directories full of HTML pages.)
     
    Last edited: Aug 6, 2014
  3. coningsb

    coningsb New Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    err ^ lol .... ok ive bookmarked the main page (index.html) page using google chrome or ie... with me so far ..
    i update the page(with dreamweaver) with a league update, ie post a comment on the main page ...save it upload it
    then using chrome or ie open up the saved bookmark, but it loads the old page I have to refresh the page manually or by pressing f5

    i havent got a .htaccess file .. ill look into that part, and the rest thanks for the reply ..
     
  4. essellar

    essellar Community Advocate Community Support

    Messages:
    3,295
    Likes Received:
    227
    Trophy Points:
    63
    Yes, you do have an .htaccess file, but you need to enable "show hidden files/dotfiles" in either your FTP client (you're using DW for that) or your cPanel file manager. And as I said, if your ISP is being "helpful", or if your browser thinks it knows better than you do, it doesn't matter what's in the <meta> tags; all they look at is the real HTTP headers.
     
  5. coningsb

    coningsb New Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    hi , thanks for your reply ..
    my x10 site had a .htaccess file which ive now added
    Code:
    # BEGIN EXPIRES
    <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresDefault "access plus 1 second"
        ExpiresByType text/css "access plus 1 month"
        ExpiresByType text/plain "access plus 1 month"
        ExpiresByType image/gif "access plus 1 month"
        ExpiresByType image/png "access plus 1 month"
        ExpiresByType image/jpeg "access plus 1 month"
        ExpiresByType application/x-javascript "access plus 1 month"
        ExpiresByType application/javascript "access plus 1 month"
        ExpiresByType application/x-icon "access plus 1 year"
    </IfModule>
    # END EXPIRES
    
    and it seems to update
    but my pc1975.co.uk ( a diffrent site but the same suff on it didnt, so ive added one and its fixed that )
    but ive just put a redirect on that atm to my x10 site

    may change the above code so it expires quicker than a month but ill see how this goes
    Thanks
     

Share This Page