Friday, February 13, 2026

Re: Inject nocache.js into the main index.html

Yeah, using the gwt property is the easiest solution. I also use it. But be aware that you now have to update your webserver configuration to tell the browser to not cache the index.html anymore. Otherwise the embedded GWT code will be outdated if you deploy an updated version of your GWT app and all the hashes of *.cache.js files have changed.


-- J.

Craig Mitchell schrieb am Freitag, 13. Februar 2026 um 02:00:28 UTC+1:
Thanks Colin.  Dug around a little and figured out all I needed was:

<meta name="gwt:property" content="baseUrl=/dt/" />

("dt" is my GWT module short name)

Now everything works, including superdevmode.  Ie: No need for the gwtNoCacheJs.contains("superdevmode") check anymore.

I think my page does load a bit faster now (on subsequent times, not the first visit).  https://drift.team/ if anyone is curious what the end result root html source looks like.

On Friday, 13 February 2026 at 10:16:23 am UTC+11 Colin Alworth wrote:
I believe that https://github.com/gwtproject/gwt/blob/main/dev/core/src/com/google/gwt/core/ext/linker/impl/computeScriptBase.js is what you're going to want to read, or possibly replace on your classpath. Alternatively, subclass the CrossSiteIframeLinker to override getJsComputeScriptBase(LinkerContext) to provide your own file.

From that file:
/**
 * Determine our own script's URL by trying various things
 *
 * First - use the baseUrl meta tag if it exists
 * Second - look for a script tag with the src set to MODULE_NAME.nocache.js and
 *   if it's found, use it to determine the baseUrl
 * Third - if the page is not already loaded, try to use some document.write
 *   magic to install a temporary tag and use that to determine the baseUrl.
 *
 * This is included into the selection scripts
 * wherever COMPUTE_SCRIPT_BASE appears with underlines
 * on each side.
 */

The "Second" step is where you appear to be getting stuck - since there is no script tag with a src attr, the rest of the loading code doesn't know what to do. So, add a meta tag for baseUrl so the script knows where the other resources are loaded from.

Note that I haven't messed with this in years, and might have missed a point or two.

On Thursday, February 12, 2026 at 4:54:23 PM UTC-6 ma...@craig-mitchell.com wrote:
I tried to inject the non-dev nocache.js into my main index.html file.  Like this:

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>";
}

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/9e8f90ca-9e51-4c1e-9642-4e0cdadb2a79n%40googlegroups.com.

Thursday, February 12, 2026

Re: Inject nocache.js into the main index.html

I should point out, this is only useful if you have a single page app.  If you load different html pages, don't do this, as you'll be reloading the nocache.js for each page.

On Friday, 13 February 2026 at 12:00:28 pm UTC+11 Craig Mitchell wrote:
Thanks Colin.  Dug around a little and figured out all I needed was:

<meta name="gwt:property" content="baseUrl=/dt/" />

("dt" is my GWT module short name)

Now everything works, including superdevmode.  Ie: No need for the gwtNoCacheJs.contains("superdevmode") check anymore.

I think my page does load a bit faster now (on subsequent times, not the first visit).  https://drift.team/ if anyone is curious what the end result root html source looks like.

On Friday, 13 February 2026 at 10:16:23 am UTC+11 Colin Alworth wrote:
I believe that https://github.com/gwtproject/gwt/blob/main/dev/core/src/com/google/gwt/core/ext/linker/impl/computeScriptBase.js is what you're going to want to read, or possibly replace on your classpath. Alternatively, subclass the CrossSiteIframeLinker to override getJsComputeScriptBase(LinkerContext) to provide your own file.

From that file:
/**
 * Determine our own script's URL by trying various things
 *
 * First - use the baseUrl meta tag if it exists
 * Second - look for a script tag with the src set to MODULE_NAME.nocache.js and
 *   if it's found, use it to determine the baseUrl
 * Third - if the page is not already loaded, try to use some document.write
 *   magic to install a temporary tag and use that to determine the baseUrl.
 *
 * This is included into the selection scripts
 * wherever COMPUTE_SCRIPT_BASE appears with underlines
 * on each side.
 */

The "Second" step is where you appear to be getting stuck - since there is no script tag with a src attr, the rest of the loading code doesn't know what to do. So, add a meta tag for baseUrl so the script knows where the other resources are loaded from.

Note that I haven't messed with this in years, and might have missed a point or two.

On Thursday, February 12, 2026 at 4:54:23 PM UTC-6 ma...@craig-mitchell.com wrote:
I tried to inject the non-dev nocache.js into my main index.html file.  Like this:

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>";
}

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/f935eef0-0bb9-4802-b6d0-31e73f8996b2n%40googlegroups.com.

Re: Inject nocache.js into the main index.html

Thanks Colin.  Dug around a little and figured out all I needed was:

<meta name="gwt:property" content="baseUrl=/dt/" />

("dt" is my GWT module short name)

Now everything works, including superdevmode.  Ie: No need for the gwtNoCacheJs.contains("superdevmode") check anymore.

I think my page does load a bit faster now (on subsequent times, not the first visit).  https://drift.team/ if anyone is curious what the end result root html source looks like.

On Friday, 13 February 2026 at 10:16:23 am UTC+11 Colin Alworth wrote:
I believe that https://github.com/gwtproject/gwt/blob/main/dev/core/src/com/google/gwt/core/ext/linker/impl/computeScriptBase.js is what you're going to want to read, or possibly replace on your classpath. Alternatively, subclass the CrossSiteIframeLinker to override getJsComputeScriptBase(LinkerContext) to provide your own file.

From that file:
/**
 * Determine our own script's URL by trying various things
 *
 * First - use the baseUrl meta tag if it exists
 * Second - look for a script tag with the src set to MODULE_NAME.nocache.js and
 *   if it's found, use it to determine the baseUrl
 * Third - if the page is not already loaded, try to use some document.write
 *   magic to install a temporary tag and use that to determine the baseUrl.
 *
 * This is included into the selection scripts
 * wherever COMPUTE_SCRIPT_BASE appears with underlines
 * on each side.
 */

The "Second" step is where you appear to be getting stuck - since there is no script tag with a src attr, the rest of the loading code doesn't know what to do. So, add a meta tag for baseUrl so the script knows where the other resources are loaded from.

Note that I haven't messed with this in years, and might have missed a point or two.

On Thursday, February 12, 2026 at 4:54:23 PM UTC-6 ma...@craig-mitchell.com wrote:
I tried to inject the non-dev nocache.js into my main index.html file.  Like this:

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>";
}

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/a77a4ea3-c4ed-48b8-bd3e-c3877109fd6bn%40googlegroups.com.

Re: Inject nocache.js into the main index.html

I believe that https://github.com/gwtproject/gwt/blob/main/dev/core/src/com/google/gwt/core/ext/linker/impl/computeScriptBase.js is what you're going to want to read, or possibly replace on your classpath. Alternatively, subclass the CrossSiteIframeLinker to override getJsComputeScriptBase(LinkerContext) to provide your own file.

From that file:
/**
 * Determine our own script's URL by trying various things
 *
 * First - use the baseUrl meta tag if it exists
 * Second - look for a script tag with the src set to MODULE_NAME.nocache.js and
 *   if it's found, use it to determine the baseUrl
 * Third - if the page is not already loaded, try to use some document.write
 *   magic to install a temporary tag and use that to determine the baseUrl.
 *
 * This is included into the selection scripts
 * wherever COMPUTE_SCRIPT_BASE appears with underlines
 * on each side.
 */

The "Second" step is where you appear to be getting stuck - since there is no script tag with a src attr, the rest of the loading code doesn't know what to do. So, add a meta tag for baseUrl so the script knows where the other resources are loaded from.

Note that I haven't messed with this in years, and might have missed a point or two.

On Thursday, February 12, 2026 at 4:54:23 PM UTC-6 ma...@craig-mitchell.com wrote:
I tried to inject the non-dev nocache.js into my main index.html file.  Like this:

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>";
}

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/9bbe0509-b98f-42e3-84f5-65cbc3e18d29n%40googlegroups.com.

Inject nocache.js into the main index.html

I tried to inject the non-dev nocache.js into my main index.html file.  Like this:

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>";
}

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.

Re: GWT 2.13 released

Wow, looks like a significant update. Thanks, Colin! Initial testing looks good here; everything builds with no issues.

On Wednesday, February 11, 2026 at 11:54:10 AM UTC-8 Colin Alworth wrote:
GWT 2.13 has been released! It is available from our releases page as a SDK zip, or from Maven Central in the usual manner.

Highlights from the release notes:
  • Removed more old polyfills and IE-specific workarounds
  • Samples updated to use Maven, usually as multi-module projects
  • 2.13 is likely to be the last release where the compiler and dev tools run on Java 11. Java 8 server support is not explicitly tested any more, we no longer seem to have any interest in this (or at least no one volunteering for the release testing or other maintenance work)
  • DevMode server defaults to only serving static files - projects that wish to use the old Jetty 9 launcher may specify -server com.google.gwt.dev.shell.JettyLauncher, but this is due to be removed. Projects should either split their server/client classpath, or switch to a ServletContainerLauncher that runs another server (https://github.com/niloc132/gwt-devmode-server-sample is an example project that can provide this)
  • Support -strict in test arguments, to more easily find compile issues in GWT libraries
  • JFR events added to replace SpeedTracer, support observability into compiler steps, permutation and fragment counts, and output size. Additionally, the gwt.jjs.dumpAst system property has been tweaked to support filtering, and generate more readable output
  • jaxb and xml-apis are now optional when using GWT's javax.validation support, set the gwt.validation.ignoreXml system property to avoid needing these
  • Improved JRE emulation tracking, listing not only supported APIs, but also document unsupported APIs with links to issues

See https://github.com/gwtproject/gwt/releases/tag/2.13.0 or https://www.gwtproject.org/release-notes.html#Release_Notes_2_13_0 for the complete release notes.

This has been a longer release cycle than we are happy with, so thank you for everyone's patience with this. Much of my own work that delayed the release will hopefully pay off for the next one - there are better tools to track what work the compiler is changing and how it is working, and more unused classes have been deprecated or removed as appropriate to enable future work to change our build system away from Ant. Other contributors made excellent use of this extra time - the list of JRE enhancements is especially impressive, the most classes updated since 2.9.0, which took far longer to produce.

There is a known issue that may impact Windows users when running DevMode or CodeServer, tracked as https://github.com/gwtproject/gwt/issues/10272. If you experience this, please do leave a note with any details about your environment - we have a candidate fix, but as most Windows testers are _not_ impacted by it, there is concern that the problem might not be fully understood or the fix incomplete.

Special thanks to our testers over the last week for validating the release on a variety of OSes, Java versions, browsers, and IDEs.

--
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/e78c47ea-c6ae-4203-8de4-5b43a6045740n%40googlegroups.com.

Re: GWT 2.13 released

Works fine for me too!

On Thu, Feb 12, 2026 at 11:54 AM Filipe Sousa <natros@gmail.com> wrote:
🥳

On Wed, Feb 11, 2026 at 7:54 PM Colin Alworth <colin@colinalworth.com> wrote:
GWT 2.13 has been released! It is available from our releases page as a SDK zip, or from Maven Central in the usual manner.

Highlights from the release notes:
  • Removed more old polyfills and IE-specific workarounds
  • Samples updated to use Maven, usually as multi-module projects
  • 2.13 is likely to be the last release where the compiler and dev tools run on Java 11. Java 8 server support is not explicitly tested any more, we no longer seem to have any interest in this (or at least no one volunteering for the release testing or other maintenance work)
  • DevMode server defaults to only serving static files - projects that wish to use the old Jetty 9 launcher may specify -server com.google.gwt.dev.shell.JettyLauncher, but this is due to be removed. Projects should either split their server/client classpath, or switch to a ServletContainerLauncher that runs another server (https://github.com/niloc132/gwt-devmode-server-sample is an example project that can provide this)
  • Support -strict in test arguments, to more easily find compile issues in GWT libraries
  • JFR events added to replace SpeedTracer, support observability into compiler steps, permutation and fragment counts, and output size. Additionally, the gwt.jjs.dumpAst system property has been tweaked to support filtering, and generate more readable output
  • jaxb and xml-apis are now optional when using GWT's javax.validation support, set the gwt.validation.ignoreXml system property to avoid needing these
  • Improved JRE emulation tracking, listing not only supported APIs, but also document unsupported APIs with links to issues

See https://github.com/gwtproject/gwt/releases/tag/2.13.0 or https://www.gwtproject.org/release-notes.html#Release_Notes_2_13_0 for the complete release notes.

This has been a longer release cycle than we are happy with, so thank you for everyone's patience with this. Much of my own work that delayed the release will hopefully pay off for the next one - there are better tools to track what work the compiler is changing and how it is working, and more unused classes have been deprecated or removed as appropriate to enable future work to change our build system away from Ant. Other contributors made excellent use of this extra time - the list of JRE enhancements is especially impressive, the most classes updated since 2.9.0, which took far longer to produce.

There is a known issue that may impact Windows users when running DevMode or CodeServer, tracked as https://github.com/gwtproject/gwt/issues/10272. If you experience this, please do leave a note with any details about your environment - we have a candidate fix, but as most Windows testers are _not_ impacted by it, there is concern that the problem might not be fully understood or the fix incomplete.

Special thanks to our testers over the last week for validating the release on a variety of OSes, Java versions, browsers, and IDEs.

--
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/abdb12ba-7f1f-4fc5-bfce-3bec851f48dfn%40googlegroups.com.


--
Filipe Sousa

--
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/CAFrD1RLZp-F0QCcRsrr%3D5D8MiH3kL55t0G99VA0oDXsNtPyudQ%40mail.gmail.com.

--
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/CA%2BkiFsdsesPEGPfvqWYiTwU5LgMvARZS%2Bk3X84RBzNsBoh22UA%40mail.gmail.com.