There are some HTML files (no pattern that I've figured out) that I can't open via the terminal, GUI or right clicking Open in Browser via Sublime Text 3.
The default browser to open the file is definitely set to Chrome. When I say to open the file in the browser it takes me to the Chrome window, but doesn't actually open the file I want.
I can open these files in Chrome itself via command + O and in Firefox or Safari by right clicking on the file and selecting them in the GUI.
It'd be great if Chrome would open files when I expect it to. I'd appreciate any help.
Assuming Google Chrome is set as your default program, you should simply double tap the HTML document and it will naturally open in Chrome.
Reload this web page later. Try adding Google Chrome as a permitted program in your firewall or antivirus software's settings. If it is already a permitted program, try deleting it from the list of permitted programs and adding it again.
View an HTML document In the TextEdit app on your Mac, choose File > Open, then select the document. Click Options at the bottom of the TextEdit dialogue, then select “Ignore rich text commands”. Click Open.
Check if the file is saved with a UTF-8 encoding. If that doesn't work, try installing another browser or using Edge/Safari/Internet Explorer or whatever built-in browser you have. It is saved as index. html.
I had the same problem. Fixed it by running this in the terminal after closing Chrome:
open /Applications/Google\ Chrome.app --args --allow-file-access-from-files
The command line args can be viewed in Chrome by visiting chrome://version/
Chrome didn't load local files for me before running this command, but for some reason Chrome Canary did.
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