[Catalyst] post processing filter in Catalyst apps

Rajesh Kumar Mallah mallah at redgrape.tech
Wed Feb 22 13:18:26 GMT 2017


Hi ,

Certain caching proxies can be configured to ignore query params,
that is why we feel altering the path to be more robust.

The templates do not have anything in them that modify the paths,
all is of course in the catalyst app (Controller) itself so I am
not really understanding the issue

( disclaimer: I am doing my first catalyst project and was
   into Mason before).


regds
mallah.


> Hi,
>
> if you want to do this for to use caching but still force the files to
> get downloaded on a new app version I'd suggest appending a query
> parameter, we use ?v=[% constants.version %] which is set in the view:
>
>
> __PACKAGE__->config(
>      CONSTANTS          => { version => $Our::App::VERSION },
>
> );
>
> This shouldn't break using the templates without a Catalyst app in the
> background and still does cache-busting.
>
> Best regards, Alex
>
> On 2017-02-19 09:40, Rajesh Kumar Mallah wrote:
>> Dear Catalyst Users ,
>>
>>
>> What would be a good place to post process the HTML output from
>> View (TT in my case).
>>
>> I would want to replace all static urls with a url bearing version.
>> eg
>> /static/images/logo-1.png should become
>> /static/ver8922/images/logo-1.png
>>
>>
>> i cannot use uri_for in templates as our  frontend designers also
>> work on the same files and load them in a non-catalyst environment.
>> (using apache on windows).
>>
>> Regds
>> mallah.
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> List: Catalyst at lists.scsys.co.uk
>> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> Searchable archive:
>> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
>> Dev site: http://dev.catalyst.perl.org/
>
>
>
>
 *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
> T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
> Handelsgericht Wien, FN 79340b
>
 *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
> Notice: This e-mail contains information that is confidential and may be
> privileged.
> If you are not the intended recipient, please notify the sender and then
> delete this e-mail immediately.
>
 *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>







More information about the Catalyst mailing list