Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Mar 2011
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Clearing xml cache

    As in the subject- How do I clear XML cache?

    I have several xml files with the same name and images inside them. Whenever I click on a file with image and then another one with same name I gat the same image!

    Any ideas?

  • #2
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,469
    Thanks
    13
    Thanked 361 Times in 357 Posts
    clear the cache of the application (browser?) XML itself is a text file or string and does not own a cache.

    or just use different names.
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  • #3
    New Coder
    Join Date
    Mar 2011
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Dormilich View Post
    clear the cache of the application (browser?) XML itself is a text file or string and does not own a cache.

    or just use different names.
    Actualy i want to remove browser cache on every load or close. I cannot use different name as xml files are generated automaticlly from mysql.

  • #4
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,469
    Thanks
    13
    Thanked 361 Times in 357 Posts
    you could add a timestamp as URL parameter. that doesn’t interfer with XML and makes the address unique.
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  • #5
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by meemee View Post
    Actualy i want to remove browser cache on every load or close. I cannot use different name as xml files are generated automaticlly from mysql.
    send some headers to the browser:
    if you use php will be this way:
    PHP Code:
    header("Expires: ".gmdate("D, d M Y H:i:s")."GMT");
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache"); 
    best regards

  • #6
    New Coder
    Join Date
    Mar 2011
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts
    And if I dont use php in this case ?:/

  • #7
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by meemee View Post
    And if I dont use php in this case ?:/
    whatever you use is same thing, send the headers with what you use.
    see your language docs and http 1.1 specs for details:

    http://www.w3.org/Protocols/rfc2616/rfc2616.html

    best regards

  • Users who have thanked oesxyl for this post:

    meemee (04-05-2011)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •