I use browser-sync 2.11.1 with OS X Chrome 48.0.2564.97 (64-bit)
When I use it as a proxy for http-website:
browser-sync start --proxy http://example.com
it works great and I can point multiple browsers to localhost:3000 so that actions done in one of them are replicated in others.
However when I use it for https-website:
browser-sync start --proxy https://twitter.com
it doesn't work. When I point browsers to localhost:3000 they do not show up in "Current Connections" of browser-sync UI and also the actions are not replicated between them.
Maybe it has something to do with my browser complaining about https:
Is there a bug in browser-sync or am I missing something?
How Does BrowserSync Work? BrowserSync starts a small web server. If you're already using a local web server or need to connect to a live website, you can start BrowserSync as a proxy server. It injects small script into every page which communicates with the server via WebSockets.
In Sublime Text 3 go to Preferences -> Browse Packages... Open 'Browser Sync' folder and edit the browser property in browser_sync_launch. js file. Save this answer.
The BrowserSync is used to watch all HTML and CSS files in the css directory and performs the live reload to the page in all browsers whenever files were changed. BrowserSync makes workflow faster by synchronizing URL's, interactions and code changes across multiple devices.
Apparently https://twitter.com
is just a bad example. When I try https://about.gitlab.com/
the synchronization between my browsers does work:
browser-sync start --proxy https://about.gitlab.com/ --logLevel debug
According to the maintainer of browser-sync:
any large site like twitter has multiple techniques in place to prevent proxing like this - and rightly so.
Browsersync is a development tool to be used on local addresses that you're working on - in those cases it will work fine with HTTPS - you'll just have to click accept on the warning about self-signed certs :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With