GWT - cache.html loaded on every refresh + third party js loaded

62 views
Skip to first unread message

new GWTUser();

unread,
Jun 6, 2008, 5:18:30 PM6/6/08
to Google Web Toolkit
I am using gwt-ext and I have integrated a gwt panel into the existing
JSP page of the web app our company is creating.

But when i check the "Net" status in firebug, i find that
MD5.cache.html is reloaded (downloaded) everytime, and so is the huge
ext-all.js file.

sizes are: MD5.cache.html = 300 KB, ext-all.js = around 550 KB

I thought GWT would cache my module. The ext-all.js is included in my
GWT module XML file, not in the host jsp page.

Am I doing something wrong or is this an issue with GWT?

Jason Essington

unread,
Jun 6, 2008, 5:35:18 PM6/6/08
to Google-We...@googlegroups.com
This is a configuration issue

The *.cache.* file naming convention is a queue for your web server to
add the appropriate cache headers to the response.
If your server hasn't added the cache headers then your browser is
going to do what it normally does which is ask for a new copy.

-jason

new GWTUser();

unread,
Jun 6, 2008, 5:39:40 PM6/6/08
to Google Web Toolkit
How do we do that? We use tomcat. Write a filter or is there a tomcat
configuration?

Jason Essington

unread,
Jun 6, 2008, 5:53:40 PM6/6/08
to Google-We...@googlegroups.com
yeah, filter is the easiest way that I know of for tomcat

-jason

Prieto-Ilarion Bianco

unread,
Jun 7, 2008, 3:12:51 AM6/7/08
to Jason Essington, Google-We...@googlegroups.com
Hi.

Also don't rely on Firebug!
Use more low-layer application, such as HTTP Analyzer to check it.
I added correct headers (Ceche-Control and Expires) with Servlet
Filter and still saw in Firebug that MD5.cache.html takes from
network every time.
But when I checked it in HTTP analyzer I saw that it's lie. Really there
wasn't HTTP requests for MD5.cache.html file. So really all worked as
espected.

Bina.

jdwyah

unread,
Jun 8, 2008, 4:49:50 PM6/8/08
to Google Web Toolkit
Hey, Check out the ToCollege.net implementation of this at
http://code.google.com/p/tocollege-net/

The filter is CacheControlFilter.java in src/main/java/com/apress/
progwt/server/web/filters

-Jeff Dwyer
http://code.google.com/p/tocollege-net/

On Jun 7, 3:12 am, Prieto-Ilarion Bianco <prieto-
ilar...@devexperts.com> wrote:
> Hi.
>
> Also don't rely on Firebug!
> Use more low-layer application, such as HTTP Analyzer to check it.
> I added correct headers (Ceche-Control and Expires) with Servlet
> Filter and still saw in Firebug that MD5.cache.html takes from
> network every time.
> But when I checked it in HTTP analyzer I saw that it's lie. Really there
> wasn't HTTP requests for MD5.cache.html file. So really all worked as
> espected.
>
> Bina.
>
>
>
> > yeah, filter is the easiest way that I know of for tomcat
> > -jason
> > On Jun 6, 2008, at 3:39 PM, new GWTUser(); wrote:
>
> >> How do we do that? We use tomcat. Write a filter or is there a tomcat
> >> configuration?
>
> >> On Jun 6, 4:35 pm, Jason Essington <jason.essing...@gmail.com> wrote:
> >>> This is a configuration issue
>
> >>> The *.cache.* file naming convention is a queue for your web server  
> >>> to
> >>> add the appropriatecacheheaders to the response.
> >>> If your server hasn't added thecacheheaders then your browser is
> >>> going to do what it normally does which is ask for a new copy.
>
> >>> -jason
>
> >>> On Jun 6, 2008, at 3:18 PM, new GWTUser(); wrote:
>
> >>>> I am using gwt-ext and I have integrated a gwt panel into the  
> >>>> existing
> >>>> JSP page of the web app our company is creating.
>
> >>>> But when i check the "Net" status in firebug, i find that
> >>>> MD5.cache.html is reloaded (downloaded) everytime, and so is the  
> >>>> huge
> >>>> ext-all.js file.
>
> >>>> sizes are:  MD5.cache.html = 300 KB, ext-all.js = around 550 KB
>
> >>>> I thought GWT wouldcache my module. The ext-all.js is included  
> >>>> in my
> >>>> GWT module XML file, not in the host jsp page.
>
> >>>> Am I doing something wrong or is this an issue with GWT?- Hide quoted text -
>
> - Show quoted text -

new GWTUser();

unread,
Jun 9, 2008, 2:23:34 PM6/9/08
to Google Web Toolkit
Thank you all for your responses.


On Jun 8, 3:49 pm, jdwyah <jdw...@gmail.com> wrote:
> Hey, Check out the ToCollege.net implementation of this athttp://code.google.com/p/tocollege-net/
>
> The filter is CacheControlFilter.java in src/main/java/com/apress/
> progwt/server/web/filters
>
> -Jeff Dwyerhttp://code.google.com/p/tocollege-net/
> > - Show quoted text -- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages