Erel B4X founder Staff member Licensed User Longtime User May 25, 2014 #1 This update adds a new method: Server.SetStaticFilesOptions. This method accepts a Map with configuration parameters that affect the way the server serves static files. For example: B4X: srvr.SetStaticFilesOptions(CreateMap("cacheControl": "max-age=3600")) The list of parameters is available here: http://download.eclipse.org/jetty/9...org/eclipse/jetty/servlet/DefaultServlet.html Attachments jServer.zip 45.1 KB · Views: 1,094 Last edited: Mar 1, 2021
This update adds a new method: Server.SetStaticFilesOptions. This method accepts a Map with configuration parameters that affect the way the server serves static files. For example: B4X: srvr.SetStaticFilesOptions(CreateMap("cacheControl": "max-age=3600")) The list of parameters is available here: http://download.eclipse.org/jetty/9...org/eclipse/jetty/servlet/DefaultServlet.html
B billzhan Active Member Licensed User Longtime User May 25, 2014 #2 Erel, It works great. Attached the demo with gzip and maxage. Size of jquery-1.11.0.js is 277kb , after minified by google closure tool is 95kb. Then gzip it, the final size is 34kb. B4X: 'google closure command line java -jar compiler.jar --js jquery-1.11.0.js --js_output_file jquery.min-1.11.0.js ' gzip command line gzip -9 jquery.min-1.11.0.js Thanks, bz Attachments webapp cachecontrol gzip and maxage enabled.zip 150.1 KB · Views: 734 Upvote 0
Erel, It works great. Attached the demo with gzip and maxage. Size of jquery-1.11.0.js is 277kb , after minified by google closure tool is 95kb. Then gzip it, the final size is 34kb. B4X: 'google closure command line java -jar compiler.jar --js jquery-1.11.0.js --js_output_file jquery.min-1.11.0.js ' gzip command line gzip -9 jquery.min-1.11.0.js Thanks, bz
AscySoft Active Member Licensed User Longtime User May 29, 2014 #3 I am confuse. Why this lib only gets updated if installed in default Libraries from b4j (from program files etc) and not on additional folder? Upvote 0
I am confuse. Why this lib only gets updated if installed in default Libraries from b4j (from program files etc) and not on additional folder?
Erel B4X founder Staff member Licensed User Longtime User May 29, 2014 #4 Good question. The internal libraries folder has higher priority over the additional libraries folder. As jServer library is included in the IDE installation you need to replace it in the internal libraries folder. Upvote 0
Good question. The internal libraries folder has higher priority over the additional libraries folder. As jServer library is included in the IDE installation you need to replace it in the internal libraries folder.
AscySoft Active Member Licensed User Longtime User May 30, 2014 #5 I see. Perhaps a list with built in libs included in the b4j IDE installation would help; or at least a text indicating "this is a internal lib etc." Upvote 0
I see. Perhaps a list with built in libs included in the b4j IDE installation would help; or at least a text indicating "this is a internal lib etc."
avacondios Active Member Licensed User Longtime User Sep 30, 2014 #6 Hi Erel, How can I read the default values for all the parameters of staticFilesOptions ? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Oct 1, 2014 #7 The default values of Jetty are used if you don't explicitly set the options. The defaults are not documented. You can see them in the source code: http://grepcode.com/file/repo1.mave...ty/servlet/DefaultServlet.java#DefaultServlet Upvote 0
The default values of Jetty are used if you don't explicitly set the options. The defaults are not documented. You can see them in the source code: http://grepcode.com/file/repo1.mave...ty/servlet/DefaultServlet.java#DefaultServlet