2012 年文章归档
共 2 篇文章
web header 设置缓存
搜集了一些关于header中cache的配置信息 为了在http的响应头中添加入Expires、Cache-Control、Pragma这样的信息,我最初是使用的在网页 元素之间添加meta标签的方式,来企图添加这些http头信息到Response中,但这样的方式一直没有效果。通过查看页面源代码,发现meta标签也确实已经正确的加上了,但通过FF观察Response对象又没有输出相应的头信息。而当我改用Filter的方式,在Filter中通过获取Response对象,执行response.setHeader()方法,将http头信息写入Response对象时,就立即看到效果了。为什么会这样呢…
2012-04-19 18:19 · HTML
Calendar roll & add
Calendar.roll() Changes a specific unit and leaves 'larger' (in terms of time-month is 'larger' than day) units unchanged. The API example is that given a date of August 31, 1999, rolling by (Calendar.MONTH, 8) yields April 30, 1999. That is, the DAY was changed to meet April's maximum, but the 'la…
2012-04-19 15:06 · others