1

I would like to update a css (version 1.0) in a web application (running on Apache, and Tomcat). From within the application, I'd like the user to be able to:

  1. Download a newer version of the css (version 1.1) from a remote place (remote web server),
  2. Replace the version of the css (version 1.0 with version 1.1) on the web app, and
  3. Preferably be able to use the new css without a restart of the web application.

Same thing with the images, and htmls too, if possible.

Thanks a bunch!

mickyji
  • 11
  • 3
  • Er, is this a desktop application or a web application? – Rein Henrichs Apr 18 '11 at 04:34
  • @Rein Henrichs - "I would like to update a css (version 1.0) in a desktop application (running on Apache, and Tomcat)." – easwee Apr 18 '11 at 15:50
  • @easwee Yes, I can read the post too. "Replace the version of the css (version 1.0 with version 1.1) on the web app." "Preferably be able to use the new css without a restart of the web application." 2 to 1 it's a web app. – Rein Henrichs Apr 18 '11 at 15:54
  • @ReinHenrichs - sorry - its a **Web** Application. – mickyji Nov 01 '11 at 17:38

1 Answers1

0

Just throwing some rough stuff out there:

  1. This should trigger a restyle: $('link[rel="stylesheet"][href="'+stylepath+'"]').attr('href', new_stylepath);
  2. You may need to trigger a redraw on some elements if their layout looks funny after the change. A hack would be to re-html the body: $('body').html($('body').html());

I don't know about updating html and images. You shouldn't have to do that if it's just a style upgrade. If you need to just, $.get(new_htmlbodypath, function(html){ $('body').html(html); });, in which case if your app had new images those urls should be in there as well.

Also, I don't think the server stack matters in this case. You're just getting new assets and updating the DOM.

The question is a bit vague, so this is all I can do.

hlfcoding
  • 2,532
  • 1
  • 21
  • 25