Timeline for Why is it that in folder structure used for Websites generally Web Pages are on same level of hierarchy as additional content related to them?
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 8, 2023 at 8:29 | answer | added | user16861522 | timeline score: 1 | |
Jun 7, 2023 at 15:06 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
May 8, 2023 at 20:13 | comment | added | Uri Raz | For pages with many files (html, css, images, js, etc) I tend to keep all the files in the same directory for two reasons. First is to reduce mental load, as all related files are in one place. The other is it improves web server performance a bit. A directory is a file with a list of file names and pointer to where they are on disk. If a page needs files from five different directories, the web server would have to open all five to look for the files. If all images are in the same directory, it would be a big file, increasing search time. | |
May 8, 2023 at 16:06 | comment | added | Stephen Ostermiller♦ |
I also don't recommend creating a directory structure by file type. I'm of the opinion that files that work together belong side-by-side. foo.html should be next to the resources used directly in that page: foo.js and foo.css and foo.jpg . There can be valid reasons to create directories, but I'm not a fan of the directory layout pictured in your question.
|
|
May 8, 2023 at 16:02 | comment | added | Stephen Ostermiller♦ |
I wouldn't recommend using document relative linking like ../pages/images/one_big_turtle.jpg whre the URL stats with a . . It is almost always better to use site relative links like /images/one_big_turtle.jpg where the URL starts with a / . Site relative links tend to be shorter, work from any page on your site, work from all sub-directories, and don't propagate crawl errors such as double slashes.
|
|
May 8, 2023 at 14:40 | answer | added | Rohit Gupta | timeline score: 0 | |
May 8, 2023 at 14:35 | history | edited | KeeperOfDs | CC BY-SA 4.0 |
added 8 characters in body
|
May 8, 2023 at 14:33 | history | edited | KeeperOfDs | CC BY-SA 4.0 |
added 55 characters in body
|
May 8, 2023 at 14:30 | history | edited | KeeperOfDs | CC BY-SA 4.0 |
edited title
|
S May 8, 2023 at 14:29 | review | First questions | |||
May 8, 2023 at 22:40 | |||||
S May 8, 2023 at 14:29 | history | asked | KeeperOfDs | CC BY-SA 4.0 |