Browser-sync not refreshing when I save (Chrome and sublime text 2) - google-chrome

When I save changes to my css code, Browser-sync doesn't refresh the browser automatically. I still have to click on my browser window and hit F5 to see the changes I have made. I installed npm and browser-sync and it shows I am connected to browser-sync. I am using Sublime Text 2 and Chrome (Dev 56.0.2924.87) on a windows 7 operating system.
Any ideas on how to fix this? Thank you!

I found a solution. I had to fix or update deprecated npm packages. How to determine path to deep outdated/deprecated packages (NPM)?
What also helped - Gulp. I used Gulp in combination with browser sync and now my browser automatically refreshes when I save changes.
I used the following link to guide me through using Gulp for the first time: https://css-tricks.com/gulp-for-beginners/

Related

Google Chrome will NOT empty cache

I have a .NET Core 3.1 web application and I'm working in VS Code.
If I make changes to my HTML or JavaScript, the browser doesn't see the changes when I refresh the page. This is happening with IE, Firefox and Chrome. If I stop the project and re-reun it, the changes are there.
I've tried :
CTRL+F5
Right click refresh button "Empy Cache and Hard Reload"
Clearing cache and browser data through settings
Checking the Disable Cache option in Network tab of DevTools
Restarting my computer
How can I make the browser see the changes I'm making to my project?
I don't want to have to constantly stop and start my project for small content changes.
I've figured this out. Turns out that for .NET Core 3.1 and possibly other versions, you need to install a Nuget package to enable compiling during debug!
I installed this Nuget package:
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (version 3.1)
And added this to Startup.cs > Configure Services:
services.AddRazorPages().AddRazorRuntimeCompilation();
Everything works the way it should now.

How to reload/refresh html page in browser automatically after change? on Windows

Is there any way how to refresh (local?) page in browser (Chrome?) during development after change and save on disk? I think node.js is the direction?
Yes, you can use gulp for that. Install gulp (npm install gulp --save-dev) and use gulp.watch to watch file changes, then use browser-sync (npm install...) to reload the browser when files change.
Note that gulp takes some getting used to. See https://browsersync.io/docs/gulp for more info.

Webgl, Safari and Chrome Compatibility

I am making my first steps coding. And since a time ago I started experimenting with Three.js.
I changed the settings of Chrome and Safari to use local files, but some months later my safari and chrome are dead, and it stops showing the local files even if I change the settings to allow local files.
It seems that it brokes if I use it a lot. Why it happens? Is there a solution to avoid this problem?
I tryed to look for this problem in Google but I can't find anything. I am using the last versions of safari, chrome and three.js and even like this Safari and Chrome still broken.
Is not a problem of my graphic card because I can see all kind of experiments in the web. Is a problem of my local files.
For example I can see this perfectly on my browsers: http://threejs.org/examples/#webgl_geometry_text
But if I download three.js and I open it from my desktop my browsers doesn't display it.
Use a webserver. It's super simple and easy. The easiest is python which is built into OSX (you mentioned safari so I'm assuming you're on OSX)
Open a terminal, cd to the folder your files are in, type
python -m SimpleHTTPServer
Now go to http://localhost:8000
The only issue with python's simple webserver is it's really slow. For 2 faster alternatives there's devd which once you've downloaded it you just type
cd path/to/your/files
path/to/devd .
devd even includes a live-reload feature so when you edit your files the browser auto-reload
Another alternative is node.js. Install it then in a terminal type
sudo npm install -g http-server
from that point on you can go to any folder and type
http-server
then in the browser go to http://localhost:8080.
Both devd and node.js are fast
Going the node.js route you can then learn about things like webpack and npm and/or bower which make it super easy to include libraries and use advanced features and advance your skills

hot reload in jekyll not working

I've installed jekyll 3.1.6 on Mint 17 (ubuntu 14.4) with
ruby 2.2 + python 2.7
My browsers are Chromium and Firefox
I think I've tried every trick I can find on the internet, but it still won't auto-reload, even though the terminal does say that auto-regeneration has been enabled and with each file content change and save, the terminal logs the change and tells me it's been done. But I'm still forced to refresh a page manually to see the changes.
Open to any and all suggestions.
Jekyll auto-generation future(Using jekyll server) automatically change/modify the files on _site folder only, it does not refresh browser windows automatically, you have to use grunt for that. There are already many of NPM packages and Repo for that.

Plugin for Sublime text 2 LiveReload

i dont know what to do.
I have installed LiveReload plugin in Sublime text 2 and extension 2.0.9, and when i click on the LiveReload icon, plugin dont want to work.Nothing at all.No alerts and messages about some errors.
What to do?
I've not heard to a sublime plugin for it, however, I used the LiveReload App.
Download LiveReload app
Install it
Add your project folder to the app
Place the script that it gives you at the bottom of your html document
LiveReload away!
Windows users like me use the app because it's easy to setup. Be warned it's buggy though in windows. However if your mac, I think it's a lot more stable, from my limited knowledge.
You can download the app here: http://livereload.com/