RWOverdijk / AssetManager

AssetManager written for zf2. Managing assets for zend framework 2
BSD 2-Clause "Simplified" License
211 stars 83 forks source link

Append last modified date to Asset View Helper even withoud cache #189

Closed pensiero closed 7 years ago

pensiero commented 8 years ago

Actually the view helper check that the cache is enabled and in case append the last modified date as query param to the filepath of the asset.

In development environment the cache is off, so the query param is not appended and the browser cache it.

What about appending the last modified query param every time?

Thanks

RWOverdijk commented 8 years ago

@pensiero Good one. But then it always goes to the file, so it doesn't get cached in the browser anyway, right? Or am I missing something?

pensiero commented 8 years ago

Well, if the cache is not enabled, the file is re-generated each time the AssetManager View Helper is invoked, so the last modified date is basically the current timestamp.

Is something like forcing the browser to always purge the cache of all the assets of the website. For development purpose I think it could be good, what do you think about?

RWOverdijk commented 8 years ago

I think that could be good, but also slow down the dev process. Perhaps make that configurable?

pensiero commented 8 years ago

Yes, good idea, I can do it

pensiero commented 8 years ago

190