Comments (4)
TSI-1943 (internal issue ID for tracking purposes)
from dxa-web-application-dotnet.
We have been looking into this Enhancement further (we were considering implementing it in DXA 1.7), but found it to be rather tricky:
Obtaining the Page's last publish date from Broker/DD4T and returning it as Last-Modified
header is quite easy, but if the Page Model is dynamically modified (e.g. by XO Model Builder, by CX Dynamic Entity Evaluator or by ListController) or contains DCPs, using the underlying Page's last publish date may not be appropriate.
Closely related to the Last-Modified
response header is processing of the If-Modified-Since
request header. For this, we have to be especially careful with dynamic Pages: how do we reliably determine whether a rendered Page is modified if it contains dynamic data (which may be obtained from other systems) and even the Views may include dynamic data?
Suggestions how to deal with this?
from dxa-web-application-dotnet.
This functionality would be used (in our case at least) in combination with a deployer extension that flushes the URL on page publish. In this use case using the publish date as Last-Modified
header would be perfectly acceptable. Also pages with dynamic content should probably not be cached by the CDN to begin with :).
IMHO I think trying to determine a Last-Modified
date depending on when dynamic content on a page changes would be sort of a theoretical discussion and sounds to me like over-engineering the solution. I would compare it to the lastmod
time stamp of a page in the sitemap.xml; I don't think anyone generates those real time based on dynamic content on a page.
from dxa-web-application-dotnet.
The question is whether it is useful to put a (potentially wrong) Last-Modified
response header in, without processing If-Modified-Since
request headers?
Typically, the Last-Modified
response header is used to trigger a If-Modified-Since
header on subsequent requests and the server can then send an HTTP 304 Not Modified
response if the page wasn't modified since that date/time.
However, accurately determining whether a (potentially dynamic) Page is modified is not easy.
I agree that "pages with dynamic content should probably not be cached (by the CDN) to begin with". But how do we distinguish between "pages with dynamic content" and "pages with static content"? Isn't the whole idea behind Dynamic Delivery architectures like DXA that the majority of pages have (more or less) dynamic content?
from dxa-web-application-dotnet.
Related Issues (20)
- Sdl.Web.Common.Models.PageModel.GetXpmMarkup() calls unused XpmMetadata HOT 2
- DXA1.6 web solution (dxa-web-application-dotnet-DXA_1.6_Release.zip) HOT 1
- Language selector URL does not expect null page id HOT 2
- Use precompiled views HOT 1
- Have DXA sources in a symbol server HOT 2
- Only possible to embedded MediaItem entities in Rich Text fragments HOT 2
- Component Link mapping fails after link depth reached in web application. HOT 2
- Model Service (R2) ComponentTemplate missing from DCP(s) HOT 3
- ModelServiceClient ArgumentNullException crash HOT 2
- HtmlHelper null pointer exceptions HOT 3
- Ambiguous DXA exception for PCA DXA model addon
- Keyword Model extensions are not supported without a Metadata Schema
- RichText model extensions are not supported
- Output Cache is caching even if there is an error on the page HOT 1
- can DXA Container Framework be extended to support DXA 2.2 on Tridion 9/9.1
- Images with spaces return 404
- BinaryFileManager - StripDimensions UrlDecode ran only when no dimensions HOT 1
- MimeMapping.GetMimeMapping returns wrong mime types
- reuse HttpClient object / SNAT port exhaustion HOT 1
- Outputcache empty content after redirect HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dxa-web-application-dotnet.