0

I am a web developer and refresh the page a lot in order to see what effects my changes to css and Javascript have. On pages with longer load times (IE 2 - 5 seconds) it is a hassle. I am wondering if i can refresh Javascript and CSS resources without reloading the HTML.


EDIT: I was wondering if there is something in google chrome or other browsers that allows me to reload cache without page reload.

  • I would rather guess so, by making the LINK or SCRIPT tags in dynamic objects created via the DOM; then "delete" those objects and re-create them (and re-specify the attribute that specifies where a file is). However, I've found that manipulating the DOM via JavaScript can be a slow activity; that might cut into some of the proposed savings. I've no time to test this now, so for now I'm just throwing the idea out as a comment. I'm wondering if this would be more appropriate for Stack Overflow (programming)? Also, I'm not sure off-hand if this would be likely to defeat cache. – TOOGAM Feb 27 '15 at 20:00
  • Are you looking for a way to do this within the page itself? Or a way to get your browser to do this? If the first, this should be over on SO - if not, you might want to adjust your tags a bit. – zeel Feb 27 '15 at 20:27
0

There are products that do not quite what you ask but are pretty close. Some allow you to see changes live in CSS only and so on.

http://livereload.com/

Other products allow you to achieve exactly what you want but don't quite do it in the way that you want... Essentially, an environment which incorporates 'live editing'. I'm not quite certain whether there's still a performance/time hit though?

https://www.jetbrains.com/webstorm/help/live-editing-of-html-css-and-javascript.html

I guess it's just a matter of time and research before you find something that works perfectly for you're prepared to do the research?

0

live-server will do this for CSS changes, but not JavaScript.

When you make a change to any file, the browser will reload the page - unless it was a CSS file in which case the changes are applied without a reload.

It works well for those that don't want to use a "heavy" IDE.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.