diff --git a/README.markdown b/README.markdown index bcc0fee..8f6809e 100644 --- a/README.markdown +++ b/README.markdown @@ -11,15 +11,16 @@ With **Reloadr**, you can tell the browsers which files are important enough to ## Client-Side Assets Just include the following in your web application's tag: - - - +```jsx + + +``` By default, the script will poll each of the specified files every two seconds. The If-Modified-Since HTTP header is used to minimize traffic and request size, so if your file has not been updated since the last time it was checked, it won't be transferred. If your file *has* been updated, the browser then will reload the entire page, which is probably what you want if you've changed something and want to see the evidence thereof. @@ -28,27 +29,27 @@ By default, the script will poll each of the specified files every two seconds. Not everyone works on client-side code all the time (myself included). Since your PHP files aren't directly accessible via HTTP, you can use the included reloadr.php file to aggregate the modification dates of your PHP files. Just put it somewhere accessible via HTTP, and if it's not at the top level of your site, tell Reloadr where it lives. If you want to limit polling to, say, every 10 seconds, you'll need to pass that value (in milliseconds) as the 'frequency' option, as shown below in the full syntax: - - - +```jsx + +``` All options are, um, optional, but Reloadr won't actually *do* anything if you don't pass it a 'client' or 'server' array. ## Potential Future Features This is kind of a quick and dirty hack. I'd like to add some features to make usage easier, but still keep it simple. Here are some ideas: -- Scan the document's HEAD to find CSS and JS urls to poll. \ No newline at end of file +- Scan the document's HEAD to find CSS and JS urls to poll.