I want to use cobalt to launch local html page, So how can I launch local page by Cobalt 16 master.
Sunch as ./cobalt --url=xxxxxxx
.
I want to use cobalt to launch local html page, So how can I launch local page by Cobalt 16 master.
Sunch as ./cobalt --url=xxxxxxx
.
Use the --web_file_path commandline argument to set the directory for the local content, in conjunction with --url to specify the start page.
Example: ./cobalt --web_file_path=/home/content_folder --url=file:///index.html
(Note the three /// is required)
This will load the page: /home/content_folder/index.html
Works on any non-gold build.
Run a local web server and point Cobalt to it using --url=http://localhost:xxxx
. This will work in all Cobalt configurations and will allow you to specify HTTP headers (for example, Content-Security-Policy
) should you need them. Same-origin policy will work as expected as well, so you'll be able to access resources such as images and style sheets.