Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absolute file paths don't work with file:// protocol #40

Open
ethanaobrien opened this issue Jan 29, 2021 · 0 comments
Open

Absolute file paths don't work with file:// protocol #40

ethanaobrien opened this issue Jan 29, 2021 · 0 comments

Comments

@ethanaobrien
Copy link

ethanaobrien commented Jan 29, 2021

Hello, I am saying this assuming people are going to download this and run it from the file:// and not from a web server.

  1. <link href="classic.css" rel="stylesheet" type="text/css">
  2. <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=LbWArJzeO7">
  3. <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png?v=LbWArJzeO7">
  4. <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png?v=LbWArJzeO7">
    I am using these 4 lines as examples. There are many more places where I see this.

I am going to point out the links it is going to. (after href="path here")
Lets assume that this is running from linux in this directory. /home/user/98-master
Lets take line 4 first.
href="/favicon-16x16.png?v=LbWArJzeO7"
Putting the / at the beginning will indicate that it is an absolute file path so the web browser will try to find the file favicon-16x16.png in the / directory (and its not). The same things happen in example 2 and 3.

Lets take example 1
href="classic.css"
This is correct, leaving out the / tells the web browser that it is a relative directory and it would try to find a file in the same directory as the index.html file. /home/user/98-master/classic.css Is where it would look for this file. So this is correct.

@1j01 1j01 changed the title Bug found - File names Absolute file paths don't work with file:// protocol Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant