[jira] [Created] (TAP5-2324) Minified and un-minified assets are mixed up
Jochen Kemnade created TAP5-2324: Summary: Minified and un-minified assets are mixed up Key: TAP5-2324 URL: https://issues.apache.org/jira/browse/TAP5-2324 Project: Tapestry 5 Issue Type: Bug Components: tapestry-core Affects Versions: 5.4 Reporter: Jochen Kemnade When an application is run with minification alternatingly enabled and disabled, it can happen that the browser uses a cached minified asset when minification is actually disabled. The problem is that both the minified and un-minified versions of an asset are served from the same URL with the same Last-Modified header. The cleanest solution would probably be to serve minified assets from a different URL, like we do for gzipped assets. If we don't want to do that, we could also check the Etag in addition to the If-Modified-Since header in the asset request. Currently, if the If-Modified-Since date is after the lastModified date, a 304 is sent regardless of whether the Etags match. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (TAP5-2324) Minified and un-minified assets are mixed up
[ https://issues.apache.org/jira/browse/TAP5-2324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jochen Kemnade updated TAP5-2324: - Description: When an application is run with minification alternatingly enabled and disabled, it can happen that the browser uses a cached minified asset when minification is actually disabled. The problem is that both the minified and un-minified versions of an asset are served from the same URL with the same Last-Modified header. The cleanest solution would probably be to serve minified assets from a different URL, like we do for gzipped assets. If we don't want to do that, we could also check the Etag in addition to the If-Modified-Since header in the asset request. Currently, if the If-Modified-Since date is after the lastModified date, a 304 is sent regardless of whether the Etags match. However that would mean that the browser could never cache both the minified and the unminified versions of the asset. was: When an application is run with minification alternatingly enabled and disabled, it can happen that the browser uses a cached minified asset when minification is actually disabled. The problem is that both the minified and un-minified versions of an asset are served from the same URL with the same Last-Modified header. The cleanest solution would probably be to serve minified assets from a different URL, like we do for gzipped assets. If we don't want to do that, we could also check the Etag in addition to the If-Modified-Since header in the asset request. Currently, if the If-Modified-Since date is after the lastModified date, a 304 is sent regardless of whether the Etags match. Minified and un-minified assets are mixed up Key: TAP5-2324 URL: https://issues.apache.org/jira/browse/TAP5-2324 Project: Tapestry 5 Issue Type: Bug Components: tapestry-core Affects Versions: 5.4 Reporter: Jochen Kemnade Labels: minification When an application is run with minification alternatingly enabled and disabled, it can happen that the browser uses a cached minified asset when minification is actually disabled. The problem is that both the minified and un-minified versions of an asset are served from the same URL with the same Last-Modified header. The cleanest solution would probably be to serve minified assets from a different URL, like we do for gzipped assets. If we don't want to do that, we could also check the Etag in addition to the If-Modified-Since header in the asset request. Currently, if the If-Modified-Since date is after the lastModified date, a 304 is sent regardless of whether the Etags match. However that would mean that the browser could never cache both the minified and the unminified versions of the asset. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Created] (TAP5-2325) Minification cache warming
Jochen Kemnade created TAP5-2325: Summary: Minification cache warming Key: TAP5-2325 URL: https://issues.apache.org/jira/browse/TAP5-2325 Project: Tapestry 5 Issue Type: New Feature Components: tapestry-core Affects Versions: 5.4 Reporter: Jochen Kemnade It should be possible to configure that certain resources that should be minified during the application startup, the rationale being that it can take some time to minify large assets and that can lead to timeouts in requirejs when the resource is requested for the first time. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (TAP5-2325) Minification cache warming
[ https://issues.apache.org/jira/browse/TAP5-2325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13977998#comment-13977998 ] Dragan Sahpaski commented on TAP5-2325: --- Nice!. I've been wanting this for some time now. Minification cache warming -- Key: TAP5-2325 URL: https://issues.apache.org/jira/browse/TAP5-2325 Project: Tapestry 5 Issue Type: New Feature Components: tapestry-core Affects Versions: 5.4 Reporter: Jochen Kemnade It should be possible to configure that certain resources that should be minified during the application startup, the rationale being that it can take some time to minify large assets and that can lead to timeouts in requirejs when the resource is requested for the first time. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Comment Edited] (TAP5-2325) Minification cache warming
[ https://issues.apache.org/jira/browse/TAP5-2325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13977998#comment-13977998 ] Dragan Sahpaski edited comment on TAP5-2325 at 4/23/14 8:57 AM: Nice! I've been wanting this for some time now. was (Author: dragan.sahpaski): Nice!. I've been wanting this for some time now. Minification cache warming -- Key: TAP5-2325 URL: https://issues.apache.org/jira/browse/TAP5-2325 Project: Tapestry 5 Issue Type: New Feature Components: tapestry-core Affects Versions: 5.4 Reporter: Jochen Kemnade It should be possible to configure that certain resources that should be minified during the application startup, the rationale being that it can take some time to minify large assets and that can lead to timeouts in requirejs when the resource is requested for the first time. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (TAP5-2325) Minification cache warming
[ https://issues.apache.org/jira/browse/TAP5-2325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13978005#comment-13978005 ] Jochen Kemnade commented on TAP5-2325: -- Then I'll happily provide my workaround for the meantime. It works for modules and goes like this: {code:title=AppModule.java|borderStyle=solid} @Startup public static void warmMinifiedJavascriptCache(final ModuleManager moduleManager, final ResourceStreamer resourceStreamer, final StreamableResourceSource streamableResourceSource, final ResourceChangeTracker resourceChangeTracker, final JavaScriptStackAssembler javaScriptStackAssembler, @Symbol(SymbolConstants.MINIFICATION_ENABLED) final boolean minificationEnabled) throws IOException { if (minificationEnabled) { // the modules that should me minified upon the application startup String[] modules = new String[] { moment, codemirror/lib/codemirror }; // resolve the modules to actual resources ListResource resources = CollectionFactory.newLinkedList(); for (String module : modules) { resources.add(moduleManager.findResourceForModule(module)); } // request StreamableResource instances for all the resources to populate the cache for (Resource resource : resources) { streamableResourceSource.getStreamableResource(resource, StreamableResourceProcessing.COMPRESSION_DISABLED, resourceChangeTracker); } } } {code} Minification cache warming -- Key: TAP5-2325 URL: https://issues.apache.org/jira/browse/TAP5-2325 Project: Tapestry 5 Issue Type: New Feature Components: tapestry-core Affects Versions: 5.4 Reporter: Jochen Kemnade It should be possible to configure that certain resources that should be minified during the application startup, the rationale being that it can take some time to minify large assets and that can lead to timeouts in requirejs when the resource is requested for the first time. -- This message was sent by Atlassian JIRA (v6.2#6252)