Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I realise that this is a bit stupid, but I'm a bit lost here - I've recently decided to re-arrange my webserver's content filing system so that it is more efficient and flexible in regards to the addition of content in the future. Could someone advise on which way will be more beneficial in the long-term?

1.) My current, original filing system:

I currently have a folder for each web page: index, contact, about, etc. Inside each webpage folder I have a folder for each type of content that is on that webpage: css, js, images, flash, pages, etc.

Examples: http://example.com/contact/images/email.png or http://example.com/about/flash/copyToClipboard.swf

2.) My proposed, planned filing system:

I plan to have a folder for each type of content. Inside each content folder I plan to have a folder for each webpage.

Examples: http://example.com/images/index/welcome.png or http://example.com/js/index/animate.js

General summary: is it better to keep each page's content isolated (filing system #1) or to keep all kinds of content together (filing system #2)? Thanks :)

share|improve this question
    
In its present form this question invites subjective answers. Could you please edit your question to explain your objectives in reorganizing your file system (more efficient and flexible how?) so an objective answer would be more likely? –  danlefree Feb 10 '12 at 14:07
    
I apologise for my lack of clarity - I wrote and submitted the question at, like, 1am. I've now added and refined a few details. I hope this gives you and others enough insight into my "problem". –  mythofechelon Feb 10 '12 at 15:03
add comment

2 Answers 2

up vote 0 down vote accepted

The first one is better. It allows you to use relative path to your assets (so that there is no problem if you want to rename "contact" to "contact-me").

There is a small benefit with the 2nd method: you can easily batch process files, e.g. optimize all JS file on the web server. However, it won't be much harder to do the same thing in the first approach.

share|improve this answer
    
Yes, I had a feeling that that may be the case soon after I posted the question last time. Thank you for providing me with additional reasoning. –  mythofechelon Feb 10 '12 at 15:41
add comment

if you have many many files, use a cloud to store it separately

if not many, all files can be saved in root somewhere as /image/ /css/ etc by type

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.