You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Tobias Soloschenko (JIRA)" <ji...@apache.org> on 2016/08/18 20:01:20 UTC
[jira] [Comment Edited] (WICKET-6194) PushBuilder API integration
[ https://issues.apache.org/jira/browse/WICKET-6194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15427058#comment-15427058 ]
Tobias Soloschenko edited comment on WICKET-6194 at 8/18/16 8:01 PM:
---------------------------------------------------------------------
Hi,
with the last commits I changed the following things:
1. I made some methods protected. The most important method which is protected now is getPageModificationTime(). The user can override this method to apply other checks for the page modification date. For example a properties file which contains the build date - this can be used to check against the if-modified-since header.
2. applyPageCacheHeader. So that the user can customize the PushHeaderItem headers
I used a little trick now and I hope this also works for chrome.
I set the expiration date to the "last-modified" date of the file (or what the user configured) - "Expires" is set to -1 so that the cache entry becomes invalid immediately. Also I set the max-age to 0 and must-revalidate, proxy-revalidate. With this options the browser uses the cache but actually don't cache anything. But what the browser do is to send the "if-modified-since" date so that the Push API can make use of the browser cache.
Also I changed the SimpleDateFormat to DateTimeFormatter so that there will be no concurrency issue.
The last thing I added was a bit javadoc.
kind regards
Tobias
was (Author: klopfdreh):
Hi,
with the last commits I changed the following things:
1. I made some methods protected. The most important method which is protected now is getPageModificationTime(). The use can override this method to apply other checks for the page modification date. For example a properties file which contains the build date - this can be used to check against the if-modified-since header.
2. applyPageCacheHeader. So that the user can customize the PushHeaderItem headers
I used a little trick now and I hope this also works for chrome.
I set the expiration date to the "last-modified" date of the file (or what the user configured) - "Expires" is set to -1 so that the cache entry becomes invalid immediately. Also I set the max-age to 0 and must-revalidate, proxy-revalidate. With this options the browser uses the cache but actually don't cache anything. But what the browser do is to send the "if-modified-since" date so that the Push API can make use of the browser cache.
Also I changed the SimpleDateFormat to DateTimeFormatter so that there will be no concurrency issue.
The last thing I added was a bit javadoc.
kind regards
Tobias
> PushBuilder API integration
> ---------------------------
>
> Key: WICKET-6194
> URL: https://issues.apache.org/jira/browse/WICKET-6194
> Project: Wicket
> Issue Type: New Feature
> Affects Versions: 8.0.0-M1
> Reporter: Tobias Soloschenko
> Assignee: Tobias Soloschenko
> Labels: features
> Fix For: 8.0.0-M2
>
>
> Allows to push resources via HeaderItem to the client and make use of the http/2 functionality. In the first step this should be an experimental module and make use of the server specific APIs until the servlet 4.0 standard is finished.
> A reference implementation can be found here:
> https://github.com/klopfdreh/wicket-components-playground/wiki/23.-PushHeaderItem_Servlet4Support
> Working-Branch:
> https://github.com/apache/wicket/tree/WICKET-6194
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)