I am trying to use the live server package which works pretty much like livereload for editor Atom. The server runs fine, but the files do not get automatically refreshed whenever I make changes + save the files..
Not sure if this is normal, but when I open up the server on the browser, I am forwarded to a directory with all the files on the server. How do I change this so that the server renders HTML only and refreshes every time changes are made?
My php files with html elements dont open, so create the file like .html files, and everythings runs well. Use .atom-live-server.json on the root project to change some options like other browsers.
Edit 1: Have the solution !
1- Install Live Reload from livereload.com.
2- Install Live Reload from browser extension.
3- Copy and paste this before before body:
<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
4- Execute live reload and the browser and still works for php files.
You haven't set the project folder for the live-server to operate from, or you've saved the file you want to view outside of where it is running from.
In the project window on the left, add the project folder that you are using, and remove anything else. Or save your file in that location.
I had the same problem with atom-live-server and Google Chrome browser. Finally made it work using these steps:
Open your Browser
In Project pane open the project folder that you want to test
Start the atom-live-server
It should automatically open a new page in your browser. Right click on it and select Inspect -> it will open Console window.
Your Live reload is enabled. Notice the message in the Console.
After you make changes in your javascript or html in Atom save your changes (Ctrl + S) and the browser page will be updated.
I fixed it by adding the <head> and <body> tags to the html file I was editing. (even though I don't always include them anymore at least one is needed for the "Live reload" server to work.)
Live reload won't work unless there's a tag in the HTML the script can be injected on (body, head, and svg).
see this github issue!
Related
I've set up ftp-simple to connect to my remote server. Files show up fine, however directories appear with [DIR] next to them which, when clicked, disappear with a red line through it, as per image below (template-parts was the directory which I had just clicked on).
As mentioned, files are fine - they load perfectly, but it's the directories which have the issue.
Nothing shows up in the output log when this happens and I can't seem to find anything about this issue elsewhere.
The only solution I have found is this.
In vscode, go File->Preferences->Settings.
Then at the search area type this -> ftp-simple.remote-workspace-load-all <- and set it to false.
What this does is, when you first load a directory (the default path that has been set in vsc config), vsc is going to load only the content of this specific directory.
Then, only if you click another directory ([DIR]), it will start to download the content of this directory.
So I am editing a website for an NPO, and I am using brackets to do so. Before today, live preview was fine, and showed the whole website. Starting today, when I open live preview, the website looks blank. However, when I use dev tools, I can see all the boxes in the site highlighted when I hover over its code. I am not sure what is happening, as I am still using the original code of the website.
I had the same problem suddenly and another threat helped me: Brackets - Live Preview not working
I tried this: Open Brackets > click on File > Open Folder and then choose the right folder, as in your local host server for your files.
So if your folders for all the files and your index page are in one overall folder (as example called "main" - C:\main) choose that folder and click open.
I had the problem that it didn't work because it wasn't directed to my "main" folder but a sub-folder, so it did not have access to all the .css and .js etc files.
I'm trying to activate workspace tool for my local project. I want to apply CSS changes on my codes when I edit them into browser.
I've added my folder, perfix url and path of my project to the Chrome like this:
But still there isn't any change in my codes when I change it into browser, What's wrong?
Here are the steps to map a local workspace to a server path, using my example:
Click "Add folder" in the Workspace settings, and navigate to your working directory. Click "Allow" in the bar at the top to grant Chrome permissions.
Add a mapping between your server and the path
Load the URL and navigate to the Sources tab. Open your file and start editing.
If you save with Cmd+S (Mac) / Ctrl+S (Windows / Linux), the changes will be persisted in the workspace.
You can read more information from the official documentation here, which shows how to add it directly from the Sources panel. Read the Limitations section, in case you are trying to do something that isn't supported.
The docs say that forge.file.saveURL() saves a file in "a permanent location", but when I perform a reload on my app and restart it, all the files that were previously downloaded and saved locally are downloaded again.
What actually happens to the local file store on reload, and is there a way to persist files? I'd like to be able to update and reload a line of JS without forcing the user to redownload megabytes of image and audio files.
I've not been able to recreate any saveURL problems with Reload - what I did:
create a new app
use file.saveURL and prefs module to download a file and remember its location (https://gist.github.com/goodgravy/6539470)
run the app - image is shown in app
make a small change to the app (e.g. some text in index.html)
push out Reload update
switch away from app, wait for Reload to be downloaded, switch back to app
index.html change has been made, and image is still shown from original saved location
I tried that out on Android 4.2 and iOS 7.
Could you try that stripped-down app I linked to to see if you're seeing the same thing? If it is still a problem, please let us know what device and OS version you're on there.
I'm currently new to asp.
I have just started running ASP file and the problem is every time I run an ASP file I have to enter the Path through url in browser.
example : http://localhost/MyWeb/test.asp
Is there any quick way of testing the ASP pages on browser.
I have created a Test server in Adobe Dreamweaver and able to run ASP pages via Dreamweaver.
But I want to run ASP files just by double Clicking on it.
Is there any way to do that.
Thanks in advance.
What you ask for is not directly possible.
What you can do is write a batch file, call it for example "DisplayPage.bat" and with such code:
set str=%1
set str=%str:C:\inetpub\wwwroot=http://localhost/MyWeb%
set str=%str:\=/%
start IEXPLORE.EXE %str%
REM pause
This is assuming your root web folder is "C:\inetpub\wwwroot" if not change to your root folder path.
Now having this follow these steps:
Right click any .asp file and choose "Open with"
In the menu select "Choose default program..."
Browse to the batch file you created above and confirm. Tick the "Always use the selected program to run this kind of file" to make it permanent.
This will cause double clicking to open the clicked file in Internet Explorer, pointing to localhost.
The above steps are for Windows 7 but can be achieved easily for any OS.
If something goes wrong with the process you can remove the "REM" from the last line so the batch file pause and show what went wrong.
You can use includes
there are two types of includes File and Virtual read more at http://www.w3schools.com/asp/asp_incfiles.asp