Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
1. install LiveReload plugin in chrome
2. install LiveReload in Sublime Text 3
3. in Sublime Text 3 go to Preferences > Package Settings > LiveReload > Setting - User
4. write
{
"enabled_plugins": [
"SimpleReloadPlugin",
"SimpleRefresh"
]
}
In Sublime Text 3 go to Preferences > Package Settings > LiveReload > Setting - User
{
"enabled_plugins": [
"SimpleReloadPlugin",
"SimpleRefresh"
]
}
PS Setting - User, not Setting - Default
This livereload got me hooked!!!
Here is my solution, wrote yesterday:
1.JS script (livereload.js):
var lastnumber = '';
setInterval("docReload()", 100);
function docReload(){
$.ajax({
type:'post',
url: 'livereload.php',
success:function (data) {
if(lastnumber != ''){
if(data != lastnumber){
location. reload();
}
}
else{
lastnumber = data;
}
}
});
}
2. PHP script (livereload.php):
$homepage = file_get_contents('index.html');
echo $homepage;
Have you installed the chrome plugin https://chrome.google.com/webstore/detail/liverelo... ?
you do not need to install the LiveReload plugin in Sublime Text3 itself, otherwise it will not work and an error message will pop up (liveReload tried to listen on port 35729, but it was occupied by another app. - LiveReload tried to listen on port 35729, but it was occupied by another application .). To work in chrome, you need to install the LiveReload program on your computer and its application in chrome. In applications, check the box - Allow files to be opened by links and specify the path to the folder in the program for the computer. Everything.
Torment with LiveReload Taken on
07/19/2017 KorSer
After several hours of studying the concept of LiveReload, trying to make friends with SublimeText3 and studying different troubleshooting techniques, I developed the following algorithm (Works on Chrome and Opera):
Install the LiveReload plugin in SublimeText:
- Ctrl + Shift + P
- Enter in the window "Install Package"
- Enter LiveReload. Installing the plugin.
- Go to the Default and User settings of the plugin: Preferences - Package Settings - LiveReload - Settings Defaiult and Settings User.
- We write there
{"enabled_plugins": ["SimpleReloadPlugin", "SimpleRefresh" ]}
Download the LiveReload program download.livereload.com/windows/LiveReloadSetup.exe
We install on the computer. We launch.
Click the +add button.
We find on the hard disk the folder of the site with which you work in SublimeText. Select it and click "Select Folder".
Click on the folder name that appears and in the second window copy the text similar to this
. Close the LiveReload program and run SublimeText.
Paste the copied text into the tag at the very top.
Launch or reload the page in the browser.
Share your opinion
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question