Remote Preview works by making an ajax call every 1100ms to check if the url in the 'url.txt' file changed. If it did, the script will then change the src attribute of the iframe and load a new page into it. If there's no changes, the script will just keep polling the url.txt until something changes. Remote Preview allows very fast previewing of different URL's to check for possible layout problems, which can then be debugged using various other tools depending on the platform where they occur.
Check out this tutorial on how to config Apache for OS X 10.8.
There's now an extension for Chrome, which, when turned on, auto sends every URL change to the controller (even the tab changes!). The extension is available via Chrome Web Store.
Current version is tested to be working on at least following platforms:
http://
prefixLicensed under the MIT license.
Copyright (c) 2012-2023 Ariel Salminen, Ben Lane
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
v0.6
(2014-09-19) - Removes sandboxing.
v0.5
(2013-03-14) - Chrome extension added. Thanks to Ben Lane and e3 media.
v0.35
(2012-11-27) - Fixes few issues on the Controller page and adds better error messages. Also some refactoring to html/css/js/php. Thank you @Krinkle!
v0.31
(2012-11-19) - Adds file extension for the 'url' file which allows Remote Preview to work on ISS too. Thanks @stowball!
v0.3
(2012-11-14) - Adds controller which allows Remote Preview to be controlled via a web browser. Thank you @sherred and Device Lab Edinburgh!
v0.21
(2012-11-13) - Adds icon for touch devices.
v0.2
(2012-11-12) - Fixes some issues which where present in the initial release and makes Remote Preview a tad faster.
v0.1
(2012-11-8) - Release
Great! New ideas are more than welcome, but please check the Pull Request Guidelines first before doing so.