Link to home
Start Free TrialLog in
Avatar of HLRosenberger
HLRosenbergerFlag for United States of America

asked on

SVG files and browser caching

How can I prevent IE or any browser from caching SVG files?   I'm create SVG using the D3 javascript library.   I create a blob object in javascript that is the SVG/XML, then post it to the server.  I then save it to a file.    When I reload that file using D3, I don't see may latest changes.   if I rename the file from, say, myfile.svg to myfile1.svg and then load myfile1.svg, all is OK.   I see the changes.  Somewhere, somehow, the SVG data is being cached.  

Any help is appreciated!
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

It's being cached by the browser, that is perfectly normal behavior.  Sending anti-caching headers first sometimes helps.  But the user is in control of their browser.  Normal cache period for IE used to be 20 days...  Here's the Google page on the subject: https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching?hl=en
ASKER CERTIFIED SOLUTION
Avatar of faikdsd
faikdsd
Flag of Bosnia and Herzegovina image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HLRosenberger

ASKER

Thanks!