Zn2O / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
0 stars 0 forks source link

CSS file is cached during Gadget Development #208

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release: Gadget API Library for GWT

Detailed description: External file such as the CSS file are cached by the
Gadget proxy. i.e. generated Javascript is : _IG_GetCachedUrl(cssUrl).
this causes problems during development as the changes on the CSS file
won't be reflected straight away because of the CSS file is cached (for 1h
maybe).
It would be good to provide an option to use a low refreshInterval during
dev : i.e. generated javascript would be : _IG_GetCachedUrl(cssUrl, {
refreshInterval: 1});

Note : Using the nocache=1 parameter in the gadget URL only disable the
caching of the gadget Spec itself, it does not dissable the caching of
_IG_GetCachedUrl

Workaround if you have one:

In the mean time use the GWT Incubator StyleInjector :
http://code.google.com/p/google-web-toolkit-incubator/wiki/StyleInjector

This will add your Css inline in your Gadget Spec. that way using the
nocache=1 also applies for the CSS.

Links to the relevant GWT Developer Forum posts:

Original issue reported on code.google.com by Nivco.las@gmail.com on 4 Nov 2008 at 1:36

GoogleCodeExporter commented 9 years ago

Original comment by galgwt.reviews@gmail.com on 4 Nov 2008 at 1:45

GoogleCodeExporter commented 9 years ago
Bob Vawter outlined a basic strategy to allow this.

- Add an annotation on the Gadget class
- Create a bogus Artifact to record the annotation
- Detect and remove the bogus artifact in the GadgetLinker and conditionally 
remove
the _IG_GetCachedUrl() call in generateStyleSheetInjector().

Original comment by galgwt.reviews@gmail.com on 12 Jan 2009 at 3:05

GoogleCodeExporter commented 9 years ago
شكرا لك

Original comment by SALeH-...@HOTMAil.com on 1 Dec 2010 at 9:16