0

Cache zul.*.wpd files

asked 2020-05-27 18:53:01 +0800

Stesycki gravatar image Stesycki
101 1

Dear all,

i try to get the the wpd files cached on the client side (e.g. zul.wnd.wpd), but it does not work. First i check the http header directives like "no-cache", but it had no effect. In zk.xml the "org.zkoss.zk.WPD.cache" is set and aktive.

In the FireFox debugger (network tab) i can see cached css files and other cached JavaScript files (both types from our application)

Every time i start the use case, the wdp files are loaded from the server, and the css-files and other js-files are read from the browser cache.

So i wonder, why the browser does not cache the zul.wnd.wpd file, which is always 11.81 kb of size?

I am using the lates ZK EE version ZK 9.0.1.2 EE (build: 2020050516)

P.S.: not enough karma for a screenshot

delete flag offensive retag edit

Comments

Re. P.S.: now you have ;)

cor3000 ( 2020-05-28 10:15:23 +0800 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2020-05-28 10:22:04 +0800

cor3000 gravatar image cor3000
5250 2 7
ZK Team

org.zkoss.zk.WPD.cache is about server side caching - avoiding/enabling the assembly of individual JS files into a wpd file (widget package descriptor) As far as I know doesn't affect client side caching.

In order to affect client side caching in the browser you have to enable (or not disable) the class web resource caching via org.zkoss.web.classWebResource.cache

link publish delete flag offensive edit
0

answered 2020-05-28 14:39:03 +0800

Stesycki gravatar image Stesycki
101 1

Thank you, it works!

I just set the param "org.zkoss.web.classWebResource.cache" explicitly to true.

before: image description

after: image description

link publish delete flag offensive edit

Comments

thanks for getting back... by default this flag should be 'true' ... maybe check whether this flag is set to false somewhere else in your configuration files zk.xml or config.xml (also in custom jar files) just to be sure it doesn't disable again in a different class loading order

cor3000 ( 2020-05-29 09:27:59 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2020-05-27 18:53:01 +0800

Seen: 7 times

Last updated: May 28

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More