How to add version to my assets in Phalcon 2

Hi, I have a problem with browser cache, and I need to add some paramter like ?v=2 to my javascript includes. But when I try this:

$this->assets->addJs('/js/specifics/custom.js?v=2');

It returns

Phalcon\Assets\Exception: Resource's content for '/var/www/web/public//js/specifics/custom.js?v=2' cannot be read

Anybody knows how can I add this parameter?

Thanks in advance, Fidel

Currently - there is no options to add it.

I do it like this with version define in the config :

public function afterDispatch(Event $event, Dispatcher $dispatcher)
    {
        foreach($this->assets->getCollections() as $name => $collection){
            foreach($this->assets->collection($name) as $ressource){
                $ressource->setPath($ressource->getPath().'?v='.$this->config->version); 
            }
        }
    }
edited Jan '18

Try to add random variable value to the GET parameters so browser will treat it as unique request,

For example:

$this->assets->addJs('/js/specifics/custom.js?v=2&_random='.uniqid('', true));

see also: http://php.net/manual/en/function.uniqid.php

In the JS you can use Math.random() to create unique value for param.

He has join i think so those things won't work in his case because framework is getting those resources and joing them and such path obviously doesn't exist.

The easier will be just put url with version in view yourself, and have some way(like check value of some get parameter, if it's there then use outputJs to regenerate js).

Download Windows 8.1

Windows 8.1 Pro ISO Download Free Full Version [2017 Direct Links]

Get the Final Version of Microsoft Windows 8.1 Pro ISO Download. Free immediate connection by freeappstorepc. Download ISO document without Media Creation Tool or Windows 8 Product key. Untouched, full form ISO 64-bit.

Windows 8 iso clients can free move up to Windows 8.1 full form without setting off to the Windows Store. You can download Windows 8.1 ISO (DVD) From MSDN with the Windows 8 item key. Download Windows 8.1 Pro ISO from their Official Microsoft Link.

Microsoft Windows 8.1 Pro ISO Download – Overview

Windows 8.1 Update incorporates new highlights and usefulness overhauls that ought to significantly enhance the general client encounter on Microsoft OS. Windows 8.1 (as administration pack) is a piece of Microsoft Windows 8's help life-cycle and introducing 8.1 refreshes will be obligatory to keep up access to help and Windows refreshes. For more data, see What's new in Windows 8.1 Pro ISO Download?

The Windows 8.1 redesign is accessible as a free alternative from Windows Store to those as of now running Windows 8 (retail duplicate). Make a beeline for the authority Microsoft connect to download Windows 8.1 ISO to begin. More about Windows 8.1 at Wikipedia.

Download Windows 8.1 Pro Installation Key

According to Microsoft Technet and MSDN, you will be required the accompanying establishment key to introducing Windows, 8.1 Professional. Note that this key isn't for windows actuation yet just for an establishment which you'll have to enter amid establishment process for both 32 Bit and 64 Bit.

XKY4K-2NRWR-8F6P2-448RF-CRYQH

The most effective method to Install Windows 8.1 ISO Using USB/DVD

After Windows 8.1 Pro ISO Download is fruitful. Spare the iso document on your PC. Presently you need to make a bootable Windows 8.1 USB/DVD media utilizing this iso record. Take this instructional exercise on How to introduce Windows 8.1 using USB Drive. The means to launch Windows 8.1 are primary and simple. Remark here on the off chance that you confront any issues amid windows 8.1 genius iso download or establishment.

Microsoft Windows 8.1 Pro OS Requirements

Memory: 2GB

Hard plate space: 20GB accessible

Video card: 1366 × 768 screen determination; DirectX 9 illustrations processor with WDDM driver

Network: Internet get to (charges may apply)

Microsoft account required for a few highlights. Watching DVDs requires isolate playback programming.

Windows 8 Free Download 32 Bit – 64 Bit ISO

Windows 8 Free Download 32 Bit – 64 Bit ISO official variant. Here you can download finish ISO Windows 8 DVD bootable in single tick and quick download.