Can the piwik js file be cached?

can the piwik js file be cached?

Yes

That means it will affect my stats ?

It’s ok to cache piwik.js. It’s a static resource.

Conversely, it is not ok to cache the output from piwik.php.

Thanks for explain. Question is my developer team want to cache this file and they want to put some expiration time something like that so page or apps load pretty fast. Is this possible i explicity specify to cache this file?

Yes you can

@matt - where do i tell to cach piwik.js file ? How ?

If you are running Apache try this:
(httpd-vhosts.conf or httpd-ssl.conf)

    <Directory /directory/path/to/piwik/>
    ExpiresActive On
    ExpiresByType application/javascript "access plus 1 week"
    ExpiresDefault "now"
    </Directory>

You will need mod_expires loaded

This config tested in Apache 2.2 and 2.4.

@matthieu
FlowerPowerNZ

above code helped ,but status code is 200 instead of 304
is it normal?
thanks