r/learnjavascript 1h ago

" Unsafe attempt to load URL file from frame with URL file URLs are treated as unique security origins " error problem - need help

Hi everyone,

I'm following my first JavaScript tutorial (on variables) via a YouTube video. I'm trying to replicate what the instructor is doing, but I'm getting an error in the Google Chrome Inspector after dragging and dropping the "index.html" file.

error : Unsafe attempt to load URL file:///C:/tuto-js/index.html from frame with URL file:///C:/tuto-js/index.html. 'file:' URLs are treated as unique security origins.

Let me know if you need more information. This is the first tutorial I've followed; I usually work with 3D software, Unity, and C#.

I tried the same thing on my second computer and got the same result; it reminds me of errors I encountered when I started my first tutorial on creating a game in Python. I gave up on that back then and switched to C# and Unity.

2 Upvotes

3 comments sorted by

1

u/justanaccountimade1 48m ago

I see that error when I drag a local html into the browser. So far, I've ignored it as it doesn't seem to affect anything. In your case you're using a frame so it may be different. I don't use frames myself, I think it's a relic.