I'm running Zend Server in a CentOS VM on Vitrualbox and I'm having a problem with linked JS and CSS assets being "cached". I say "cached" because they aren't, in the true sense, being cached, but rather when I add content to a JS or CSS file they become corrupted and the changes do not appear. Instead the file is appended with a bunch of bad characters eg.
layout.phtml (zend framework template)
$this->headScript()->appendFile ('/js/admin/product.js', 'text/javascript' )
;
This renders:
<script type="text/javascript" src="/js/admin/product.js"></script>
products.js
//re-add scrolling handles
scrollThumbs.reSortThumbs(ul);
product.moveFileInput(ul);
};
};��������������������������������������������������
If I remove content from the JS or CSS file the result is an incomplete file and not the addition of bad characters as outlined above.
I've turned off all forms of Zend caching and even turned off Zend Optimizer. I've deleted browser cache and tried several browsers.
I have ssh'd into the server and double checked the file and it is perfectly formatted and contains the changes. I've tried restarting Zend Server (/usr/local/zend/bin/zendctl.sh restart
) and Apache (service httpd restart
)
The only way to fix it is to restart the entire OS (reboot
). Interestingly, if I remove the changes, it goes back to working correctly. I can only assume that there is some form of caching happening somewhere on the server side.