Zend Server "Caching" JS and CSS Files

I am running Zend Server on VM CentOS on Vitrualbox, and I have a problem with JS and CSS assets that are “cached”. I say “cached” because they are not, in the true sense, cachable, but when I add content to a JS or CSS file, they get corrupted and the changes are not displayed. Instead, the file is added with a bunch of bad characters, for example.

layout.phtml (zend frame template)

$this->headScript()->appendFile ('/js/admin/product.js', 'text/javascript' );

It means:

<script type="text/javascript" src="/js/admin/product.js"></script>  

products.js

        //re-add scrolling handles
        scrollThumbs.reSortThumbs(ul);
        product.moveFileInput(ul);
    };
};                                                  

If I delete the content from the JS or CSS file, the result is an incomplete file, and not the addition of bad characters, as mentioned above.

I disabled all forms of Zend caching and even disabled Zend Optimizer. I deleted the browser cache and tried several browsers.

ssh'd , . Zend Server (/usr/local/zend/bin/zendctl.sh restart) Apache (service httpd restart)

- (reboot). , , . , , - .

+3
3

, Virtualbox, , Zend Server, Apache .

VirtualBox Apache

EnableSendfile off vhost, .

<VirtualHost *:80>
    DocumentRoot "/mnt/your/shared/dir"
    ServerName Default

    <Directory "/mnt/your/shared/dir/public">
        EnableSendfile off
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
+4

, , . , md5_file() ​​ cookie, , cookie - .

0

I tried the object EnableSendfile off, but it does not work on my Centos virtual machine with ZendServer. So I switched to my ubuntu virtual machine with apache installed (without ZendServer), and it worked fine. It seems to me that this is a problem on ZendServer, at least in the ZendServer configuration.

0
source

All Articles