Project

General

Profile

Actions

Feature #92742

closed

Frontend-Event Feature Request - a new PSR-14 Event?

Added by Mati Sediqi about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-10-31
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
easy
Sprint Focus:

Description

Hey there,

I was wondering why there's actually no frontend-event (PSR-14) actually?

Would like to avoid using any kind of middleware, since in my use case (which I'll explain right after this) there's actually no need to depend to a middleware, but more to an event, to listen when the frontend has been rendered (which would pass the output HTML code) and to do things to e.g. manipulate it - more likely the tsfe_lib-Hook for contentProc AFAIK.

So my use case is at the moment:
I started writing an independent HTML caching system, which serves static HTML files - checking their existence in the index.php.
I've added all there - and it works super fine. It'd be easier to cache the output HTML code now by listening on the (let's call it) "FrontendRenderedEvent", so it'd be possible to store that then (in my use case now) into a static file.

Another use-case would be maybe to filter-out cookie-depending HTML codes maybe - e.g. iframe-tags from 3rd-domains or any other kind of script-tags etc.

Would love to see something into that direction, as I guess it shouldn't be thaaat complex. :)

Greets,
Mati.

PS: I'm sorry if I break any rule, i'm kinda new here on forge and didn't know where rules are nor if I'm actually allowed to create an issue.

Actions

Also available in: Atom PDF