Namran Hussin Linux How to force reload a XML / HTML files on server

How to force reload a XML / HTML files on server

How you wish the browser not to cache the configuration file inside an XML file.

adding the following to /etc/httpd/conf/httpd.conf
would help a bit.

# For XML
# Force reload

Header set Cache-Control "max-age=60, public, must-revalidate"
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"

2 thoughts on “How to force reload a XML / HTML files on server”

  1. The server response can be checked as following :

    [namran@nb-namran ~]$ wget -O- --server-response http://dev.namran.net/index.html 2>&1 |less
    

    and it should shows the response as the following

    ...--2010-11-10 23:51:18-- http://dev.namran.net/index.html
    Resolving dev.namran.net... 210.48.154.27
    Connecting to dev.namran.net|210.48.154.27|:80... connected.
    HTTP request sent, awaiting response...
    HTTP/1.1 200 OK
    Date: Wed, 10 Nov 2010 15:51:20 GMT
    Server: Apache/2.2.3 (Red Hat)
    Last-Modified: Sun, 24 Oct 2010 08:54:00 GMT
    ETag: "5bf39c-d5-4935904475a00"
    Accept-Ranges: bytes
    Content-Length: 213
    Cache-Control: max-age=60, public, must-revalidate
    Expires: Thu, 15 Apr 2010 20:00:00 GMT
    Connection: close
    Content-Type: text/html; charset=UTF-8
    Length: 213 [text/html]
    Saving to: `STDOUT'
    
    
    
    Loading mesinPhotostat
    
    
    Loading mesinPhotostat ...
    
    
    
    

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post