How to make Google Chrome load content from hard drive

Topics related to using ToolBook for building web apps.

How to make Google Chrome load content from hard drive

Postby Clifton » Sat Oct 24, 2015 2:51 pm

UPDATED January 28, 2019:
Instead of using the hack shown below, simply use the built in PowerPac Server to load you content in any browser, including Edge. Instructions are also provided on how to use the PowerPac server in stand-alone mode using the supplied config.ini file. Check this out in the [server] folder of the PowerPac installation.

Chrome security prevents loading ToolBook exported content from a local hard drive. The only way to view content in Chrome is to load the content on a web server and then open the content in Google Chrome.

However, a registry hack can give you the ability to load your content in Chrome.
  1. Open the registry editor using Start > Run > regedit.exe [press enter or click OK]
  2. Locate the registry key HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command
  3. Change the default value from . . .
    "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -- "%1"
    . . . to . . .
    "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --allow-file-access-from-files -- "%1"
This change makes Google Chrome behave a little more like Internet Explorer and Firefox. I find this a real time saver when confirming content loading in Chrome.

NOTE: You can also modify the Google Chrome shortcut and save it to a new name. But this approach will not allow clicking on Chrome in the export browser list after your export has completed. In other words, Chrome will still open in it's original security model and prevent loading the book content.

UPDATE: While the above works, it is flawless if you open a Chrome session first ... then export ... then you can freely click to view the content in Chrome (which will open a new tab with the hard drive HTML content displayed).
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Return to Web (DHTML) Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron