Login|Contact Us
Question and Answer

Programming

Ask a Programming Question, Get an Answer ASAP!

  • Ask A Question
  • Browse Answers
  • Meet The Experts
  • How JustAnswer Works

I need help with tweaking Cache-Control for an xml file so

 
naqshi's Avatar
  • Answered by:naqshi
  • Senior Software Developer
  • Positive Feedback: 100.0 %
  • Accepted Answers: 32
Verified Expert
in Programming

Recent Feedback

Positive
great!!!
Positive
Great asset to Just Answer! Thank you for all of your help
Positive
great help!
Positive
Very useful advice my question resolved fine
Positive
Thank you for being there and for being so helpful and so fast. You are the...
Positive
Thanks naqshi You are the greatest. Janice Ritter
Positive
We actually needed to run the CMD program as Admin. But the answer gave us the...
Positive
Thanks for helping me on a US holiday weekend!
Positive
Clear and concise.
Positive
thank you so much

Customer Question

I need help with tweaking Cache-Control for an xml file so that it forces the client to re-download the file every time there is a change to it.  It is an xml files that contains a bunch of google map markers and it gets read by a custom google maps application on page load.  The system writes changes to the xml file each time a new listing is created/modified/deleted by an admin..  So how can I make it so the client browser or any part of the cache chain will be forced to download a new copy when the file is changed?  (P.S. i want to place this setting in an .htaccess file that sits in the same directory as the xml file)

Submitted: 663 days and 1 hours ago.
Category: Programming
Value: $65
Status: CLOSED

Accepted Answer

Expert:  naqshi replied657 days and 22 hours ago.


naqshi :

Hi, you need to add a query string variable at the end of xml file name where you are accessing it....

naqshi :

Like ..\data\markers.xml?version=2.1

naqshi :

2.1 should be a random number

naqshi :

Hope it helps!

naqshi :

Thanks you for your feedback and accept.

Customer :

So that means it'll be cached still? And that it will only need to download again when there is a change to the file?

naqshi :

Until your version number remains same it will remain in the cache. as soon as you will change the version number to say 2.2 or anything, it will force the browser to download the new copy from the browser. Same technique is used if someone wants to make sure that all script files are latest from server and not from cache.

naqshi :

Thank you.

Customer :

Ok sounds good. And this is the only way to do it?

Expert TypeSenior Software Developer
Category: Programming
Pos. Feedback: 100.0 %
Accepts: 32
Answered: 8/7/2011

Experience: Developing software since 1999 in different languages and databases.

Ask this Expert a Question >
Expert:  naqshi replied651 days and 6 hours ago.

Thank you for the accept.
I am sure there would be other ways as well, however I've used only this one as its easy to deal with.
thanks again.

 
Tweet

2 Programmers are Online Right Now

Ask Your Question Now
Programming Questions Date Submitted
For The Doctor ONLY - Please fix the Doe Valley town Meeting 5/18/2013
Scenario: 5/17/2013
I need help with my website, I put in the Infolink ad code 5/17/2013
Microsoft Visual Basic 2010 Programming Exercise 5/16/2013
I am programming and auto reply macro and Outlook 10 that is 5/16/2013
Hello. I really need help with C Programming. I need a program 5/15/2013
I need to make the submit button bigger 5/15/2013
"For Jatechexpert" Part 1Programming Exercise 2—Calories 5/14/2013
INSTRUCTIONS: VERY IMPORTANT, THIS IS TO BE DONE USING MICROSOFT 5/13/2013
I have a JavaScript programming question. I have a form and 5/13/2013
RSS
Next 10 >
Ask A Programmer
Type Your Programming Question Here...
characters left:

Top Programming Experts

See More Programmers

JustAnswer in the News

Nbc
Washington Post
New York Times
Cnn
Learn More

How It Works

  • Ask an Expert
  • Get a Professional Answer
  • Ask Followup Questions
  • 100% Satisfaction Guarantee
Learn More

Ask a Programmer

Get a Professional Answer. 100% Satisfaction Guaranteed.
149 Programmers are Online Now
Type Your Programming Question Here...
characters left:
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.
Truste
Contact Us | Terms of Service | Privacy & Security | About Us | Our Network
© 2003-2013 JustAnswer LLC
  • Pearl.com
  • JustAnswer UK
  • JustAnswer Germany
  • JustAnswer Spanish
  • JustAnswer Japan