Webserver: -mod: also use cacheing headers for other resources
This commit is contained in:
1 parent
924f45c6d0
commit
60a8c59b7d
1 file changed
+8
@@ -177,6 +177,10 @@ namespace ServerLib
|
||||
if (WebOperationContext.Current != null)
|
||||
{
|
||||
WebOperationContext.Current.OutgoingResponse.ContentType = "text/javascript";
|
||||
WebOperationContext.Current.OutgoingResponse.LastModified = DateTime.UtcNow;
|
||||
WebOperationContext.Current.OutgoingResponse.Headers.Add(
|
||||
HttpResponseHeader.Expires,
|
||||
DateTime.UtcNow.AddHours(4).ToString("r"));
|
||||
}
|
||||
|
||||
byte[] data = CServer.GetSiteFile("js/" + filename);
|
||||
@@ -198,6 +202,10 @@ namespace ServerLib
|
||||
if (WebOperationContext.Current != null)
|
||||
{
|
||||
WebOperationContext.Current.OutgoingResponse.ContentType = "text/css";
|
||||
WebOperationContext.Current.OutgoingResponse.LastModified = DateTime.UtcNow;
|
||||
WebOperationContext.Current.OutgoingResponse.Headers.Add(
|
||||
HttpResponseHeader.Expires,
|
||||
DateTime.UtcNow.AddHours(4).ToString("r"));
|
||||
}
|
||||
|
||||
byte[] data = CServer.GetSiteFile("css/" + filename);
|
||||
|
||||
Reference in new issue
Block a user