String gwtNoCacheJs = loadFileFromServlet("/dt/dt.nocache.js");
if (gwtNoCacheJs.contains("superdevmode")) {
gwtNoCacheJs = "<script type='text/javascript' src='/dt/dt.nocache.js'></script>";
}
else {
gwtNoCacheJs = "<script type='text/javascript'>\n" + gwtNoCacheJs + "\n</script>";
}
if (gwtNoCacheJs.contains("superdevmode")) {
gwtNoCacheJs = "<script type='text/javascript' src='/dt/dt.nocache.js'></script>";
}
else {
gwtNoCacheJs = "<script type='text/javascript'>\n" + gwtNoCacheJs + "\n</script>";
}
String html = loadFile("index.html").replace("XXX", gwtNoCacheJs);
However, it doesn't work, as nocache.js wants to load files from the same sub directory it's located in, and not the root directory.
Has anyone done this? It probably isn't work the effort, as it'll only save one network call, but I was curious if it's possible.
-- You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/eaead646-7b11-4c83-81b7-508623eaed02n%40googlegroups.com.
No comments:
Post a Comment