Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.5k views
in Technique[技术] by (71.8m points)

javascript - Chrome blocking redirects to local file urls

When I try to navigate to a offline html file using javascript such as:

window.location.href = "file:///C:/Path/To/File.html"

Google Chrome gives me blocked web page with the url:

about:blank#blocked

It lets me do the redirect if I do call from another local html file, but not if I do the redirect from a site.

I don't want to host my offline html files remotely or locally.

I just want google to stop being a pain for 5 seconds and let me go to the url I want.

What flags, options, or command line args can I use to disable this annoying "security feature".


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...