Wednesday, December 31, 2014

Re: how not to cache background image?

Magnus,

Since you want the image cached, but not cached, and to always have the same URL, you're got very contradictory requirements.

Have you considered passing state to your app at startup with information like the proper image URL to use and then dynamically setting it that way? Then you can just use a DB column, quartz job, JMX bean, etc to update this image property as needed and all users will get the proper image on next page load. Personally, I use a root index.jsp page that's cached with a TTL that inlines these parameters into the page and then the GWT entrypoint fetches then when initializing on startup, thus skipping that extra XHR since it's essentially constant information until it changes.

-Joe

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment