Project

General

Profile

Actions

Bug #63821

open

Story #63815: Reduce communication between server and client

HTTP header status 200 should be 304 when cached page not modified

Added by Patrick Broens over 9 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2014-12-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

When a cached page is requested, a "Last-Modified" header is sent with the response, based on the SYS_LASTCHANGED field of the page.
The server response always has a "HTTP/1.1 200 OK" status

There is no check if the browser request comes with a "If-Modified-Since" header. If so, It should be compared with SYS_LASTCHANGED. If the date of SYS_LASTCHANGED is earlier or equal than "If-Modified-Since", it should return a "HTTP/1.1 304 Not Modified" status, instead of "HTTP/1.1 200 OK".

A "HTTP/1.1 304 Not Modified" status does not have to send the content of the page, which reduces traffic.


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Feature #17085: HTTP GET 'If-Modified-Since' ignoredClosed2007-03-06

Actions
Actions #1

Updated by Patrick Broens over 9 years ago

  • Parent task set to #63815
Actions #2

Updated by Patrick Broens over 9 years ago

  • TYPO3 Version changed from 6.2 to 7
Actions #3

Updated by Sigfried Arnold over 9 years ago

In principle, this is a good idea - but it is a bad idea to bind this at SYS_LASTCHANGED since this value does not necessarily contain the needed information

for example, if the page contains a plugin which generates a "random" output, you can't send 304 by comparing with SYS_LASTCHANGED - and TYPO3 simply does not know if an INT-cObject has not changed since the last request.

The only soltion for that would be a really careful cache configuration (by the Developer using the right cObject and the Editor, by defining those values in the cache control settings) - but this is also not trivial, since taking a page from the TYPO3 cache does not necessarily mean, it has not been modified.

Actions #4

Updated by Mathias Schreiber over 8 years ago

  • Status changed from New to Closed

will continue in #63821

Actions #5

Updated by Popy no-lastname-given over 8 years ago

WIll it continue or will it stay closed ?

BTW, Sigfried is wrong : TYPO3 knows if there is INT objects, and no cache headers at all are sent in this case.

Actions #6

Updated by Mathias Schreiber over 8 years ago

  • Status changed from Closed to New

Redmine freaks me out

Actions #7

Updated by Daniel Siepmann about 4 years ago

There is also the ETag handling which is already generated and send by TYPO3, but not respected when receiving an ETag.
https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching

This also affects current master.

Actions #8

Updated by Daniel Siepmann about 4 years ago

  • Category set to Frontend
  • Assignee set to Daniel Siepmann
Actions #9

Updated by Simon Schaufelberger almost 2 years ago

  • PHP Version deleted (5.5)

@ Daniel Siepmann: You have assigned this issue to yourself, will you work on this?

Actions #10

Updated by Daniel Siepmann almost 2 years ago

  • Assignee deleted (Daniel Siepmann)

I planed, but never did. Freed up the assignment, thanks for questioning.

Actions

Also available in: Atom PDF