'Chrome not opening local html files

I've got a problem on Chrome (v31) on Win 8.1 (64 bit) where if I double click on any local html files Chrome does not open them.

I've got the default browser set to Chrome but it refuses to open them.

If I set the default to IE it then opens. Setting back to Chrome and I can't open them again.

Any ideas as to what the problem could be?



Solution 1:[1]

Tried the reset solution ofered here but didn't work for me

However this worked:

Go to Program Files/Google/Chrome/Application

If you have chrome.exe and old_chrome.exe

Delete chrome.exe (after making a backup) and rename old_chrome.exe back to chrome.exe

Solution 2:[2]

I had the same issue, I used VS Code live server, and it worked for me.

these additional code was inserted by live server. You may use it.

<!DOCTYPE html>
<!-- saved from url=(0035)http://127.0.0.1:5500/solution.html -->
<html data-lt-installed="true"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  


<script type="text/javascript">
    // <![CDATA[  <-- For SVG support
    if ('WebSocket' in window) {
        (function () {
            function refreshCSS() {
                var sheets = [].slice.call(document.getElementsByTagName("link"));
                var head = document.getElementsByTagName("head")[0];
                for (var i = 0; i < sheets.length; ++i) {
                    var elem = sheets[i];
                    var parent = elem.parentElement || head;
                    parent.removeChild(elem);
                    var rel = elem.rel;
                    if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") {
                        var url = elem.href.replace(/(&|\?)_cacheOverride=\d+/, '');
                        elem.href = url + (url.indexOf('?') >= 0 ? '&' : '?') + '_cacheOverride=' + (new Date().valueOf());
                    }
                    parent.appendChild(elem);
                }
            }
            var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://';
            var address = protocol + window.location.host + window.location.pathname + '/ws';
            var socket = new WebSocket(address);
            socket.onmessage = function (msg) {
                if (msg.data == 'reload') window.location.reload();
                else if (msg.data == 'refreshcss') refreshCSS();
            };
            if (sessionStorage && !sessionStorage.getItem('IsThisFirstTime_Log_From_LiveServer')) {
                console.log('Live reload enabled.');
                sessionStorage.setItem('IsThisFirstTime_Log_From_LiveServer', true);
            }
        })();
    }
    else {
        console.error('Upgrade your browser. This Browser is NOT supported WebSocket for Live-Reloading.');
    }
    // ]]>
</script>

Solution 3:[3]

Tested on Chrome (on Windows 7): Privacy and security > Site Settings > Pop-ups and redirects > Under [Customized behaviors] > Allow " file:///* "
(note the wild card "*" this will open HTML files anywhere on local drive)

Then click on the small Arrow next to the entry, this will open a detailed customization window and scroll down to the "allow pop-up/redirects setting". You can also allow other things on the list, like allow local javascripts, etc.

Solution 4:[4]

Just restart your computer, it worked for me. Don't know why excatly, but it solves the problem...

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 blackace
Solution 2 Suman Achary
Solution 3 greybeard
Solution 4 Aleksandar