Posted on 22/05/2023 11:44:36
That is the only option.
You can easily do it though:
Either create a notification subscriber, i.e. this one:
[Subscribe(Dynamicweb.Notifications.Standard.Page.OnOutput)]
public class PageOnOutputObserver : NotificationSubscriber
{
public override void OnNotify(string notification, NotificationArgs args)
{
if (args == null)
return;
var onOutputArgs = (Dynamicweb.Notifications.Standard.Page.OnOutputArgs)args;
}
}
and then add some response headers:
response.AddHeader("Cache-Control", "no-cache");
response.AddHeader("Expiresabsolute", DateTime.Now.AddYears(-30).ToString("r"));
Or just do it in the template.
What is your use case?