Jump to content
Fi8sVrs

CSSrefresh

Recommended Posts

  • Active Members
Posted

CSSrefresh is a small, unobstructive javascript file that monitors the CSS-files included in your webpage. As soon as you save a CSS-file, the changes are directly implemented, without having to refresh your browser.

Why would I need it?

When you're coding a website, nothing can be more frustrating than having to switch from the texteditor to the browser over and over again, just for small changes to occur. With CSSrefresh installed, all the included stylesheets are automatically refreshed directly after you save them.

How do I use it?

Using CSSrefresh is easy. You can either include the javascript-file in your webpage, or use the bookmarklet.

Get the script

Download the file: CSSrefresh.js

and include it in your webpage:

<head>
<link rel="stylesheet" type="text/css" href="css/site.css" />
<script type="text/javascript" src="js/cssrefresh.js"></script>
</head>

Note:

  • Only CSS-files included before the CSSrefresh-file will be refreshed.
  • CSSrefresh uses a XMLHttpRequest to get the modification time of the CSS-files, therefore it only works in a server environment.

Source CSSrefresh - automatically refresh CSS files

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...