Please sign in to comment.
Add HTTP-status handling to news, fixes #16
Handling is as following: - maximum amount of news items to show is defined in `inc/config.inc.php`, currently 10 - no parameter given (i.e. `/news.html`) -> Redirect with 303-Location with all items, newest first - Parameter `lastvisit` given (i.e. `/news.html?lastvisit=2`) -> Redirect with 303-Location with all items with a higher ID than the `lastvisit` value (e.g. > 2 ) - if `lastvisit` == `newest` no redirection will be excuted but instead `304 Not Modified` returned with no content - Parameter `newest` set (from redirect) -> no further interference After redirection the value of the parameter `newest` can be stored on the client to be used in `lastvisit` with the next news request to check for and see only newer items.
- Loading branch information...
Showing with 59 additions and 17 deletions.