SitePoint Sponsor |
|
User Tag List
Results 1 to 12 of 12
Thread: Website Folder Structure
-
May 3, 2002, 03:58 #1
- Join Date
- Feb 2002
- Location
- UK
- Posts
- 103
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Website Folder Structure
Hello, can anyone advice me with the following please
My website I’m designing has approximately 100 pages and at the moment each page has its own folder to store that pages images i.e. pageone.htm has directory pageone_files and pagetwo.htm has pagetwo_files etc.
I was thinking..... is this the best way to have the structure bearing in mind about 80% of the images are common through out my site, or should I have just one directory storing all images therefore dramatically reducing the size (bytes) of my site.
Also if using just one directory will there be a speed issue – making the site load slower?
Thanks all in advance
sanc
-
May 3, 2002, 04:05 #2
- Join Date
- Jul 2001
- Location
- The Netherlands
- Posts
- 2,617
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I would certainly opt for the second option, keeping one folder for all your images. This does not take down the speed of your website, and makes sure the website is a lot smaller then it is right now, so it will take up less diskspace.
-
May 3, 2002, 04:43 #3
- Join Date
- Jun 2001
- Location
- Adelaide, Australia
- Posts
- 6,441
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You should have a common 'images' folder, it makes life a whole lot easier... plus if you ever move a page somwhere, the image paths always stay the same.
Having the images in a dfferent directory wont effect speed, etc at all, in fact the way you have it now might be forcing unnecesary downloads of the same image
-
May 3, 2002, 05:09 #4
- Join Date
- Nov 2000
- Location
- Chico, Ca
- Posts
- 1,125
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Definatly agree, one common folder for the images, it just makes linking the images and future management of the site so much easier. And if you use XHTML and CSS it's even easier
Chuck"Happiness doesn't find you, you find happiness" -- Unknown
www.chuckknows.com
-
May 3, 2002, 05:19 #5
- Join Date
- Feb 2002
- Location
- UK
- Posts
- 103
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks guy for your advice
The reason for me asking in the first place was because when I originally started designing my site on Dreamweaver 4 it automatically or prompted (can't remember) to set up the structure as described.
Thanks again, will probably change the structure now making it nice and slim line
sanc
-
May 3, 2002, 05:33 #6
- Join Date
- Aug 2000
- Location
- Thailand
- Posts
- 4,810
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Again, yep - common images folder is wise
You can if neccessary have context specific subfolders to make things easier to follow (for example "Layout" to contain your structural graphics "photos" to contain photographs "headers" to contain section headers etc). This is not neccessary, but it does make the site easier to understand. The same clarity can be achieved simply by implementing and adhering to "naming conventions".
A word on linking -
Relative linking is groovy as it saves code, but if you move files around the structure of the site it can go pear shaped. Absolute linking gives a ton of code, and means that the site is not so easily portable if you get yourself a funkier url. My current preferred option is to use "/images/sample.gif". This ensure that wherever your page is in the site, it will first go to it's root, then to the images folder.
For example:
You have a page : www.mysite.com/fee.html
In that page, you have an image called "fi.jpg", which is stored in "www.mysite.com/images/fi.jpg" .
You could use any of the above methods to link. All is fine for a few months until you decide to "archive" the page. It's new address becomes: "www.mysite.com/archive/fee.html" .
If you have linked with option 1 (relative), you've just lost the image. The page is now looking for "www.mysite.com/archive/fi.jpg" - and that doesn't exist. If you'd linked with option 2 (absolute), your page would still work ok.
Then..... The domain name "foe" becomes available - you've wanted it for years so buy it and port your site.....aaaargh - the pictures dissapeared again.
You've moved your site to the new domain, but now the page (which has become www.foe.com/archive/fee.html), is looking in the wrong place for the picture. Had you used the last option, it wouldn't care about the www.mysite.com/www.foe.com - it would simply have gone to the root - then found everything still in its proper place
Does that make sense?~The Artist Latterly Known as Crazy Hamster~
922ee590a26bd62eb9b33cf2877a00df
Currently delving into Django, GIT & CentOS
-
May 3, 2002, 05:33 #7
- Join Date
- Aug 2001
- Location
- Sweden
- Posts
- 548
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
To make it even some esaier ...
I have one folder for general images and separate folders inside subsection folders where the images for that specific folder is stored...
It is a whole lot easier if you would like to erase a subsection, swap all images etc etc...T O B I A S - S T R A N D H | visit my site here
OPERA7 /MSIE6 /FireFox 1.1/Win2000 /ADSL /17" Screen /1024x768
god doesn't create genius, he clones me.............
-
May 4, 2002, 05:24 #8
- Join Date
- Jan 2002
- Posts
- 21
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Search engines
Hello sanc,
A point to note: a seperate images folder is wise for search engine traffic. Engines may suspect you of spamming. In todays world of search engine traffic you have to follow by the rules.
All the best with your site!
Regards
Richard
-
May 4, 2002, 05:47 #9
- Join Date
- May 2001
- Location
- Sydney, Australia
- Posts
- 2,243
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Re: Search engines
Originally posted by wayhawke
A point to note: a seperate images folder is wise for search engine traffic. Engines may suspect you of spamming. In todays world of search engine traffic you have to follow by the rules.
how i work is i have a /common/ folder (css, functions, ect ect), in this i have a sub folder called images (/common/images/) that i store all the images that are used site-wide for the layout, and then i have a general /images/ directory for images that arent specifically for one page.
-
May 12, 2002, 22:31 #10
- Join Date
- Feb 2001
- Posts
- 8
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
where you store your images and how doesnt matter to the search engines. they cant tell the difference between images.
-
May 12, 2002, 23:01 #11
- Join Date
- May 2002
- Location
- Huntsville, AL
- Posts
- 224
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
As others have suggested, I would just have one 'images' folder. It makes life incredibly simple. You don't have to worry about uploading image after image to this place or that place...it's much more easy. You have enough work already. Why make life harder on yourself?
JasonJason Bradley
Post your project and receive FREE bids from professionals!
naSnap Freelance Marketplace
-
May 12, 2002, 23:16 #12
- Join Date
- Jun 2001
- Location
- outside my mind
- Posts
- 900
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sometimes Ill mirror a sites content and imgages folder. So I'll have
/img/beans/soft.jpg
I never was good at naming images to make sense.
Bookmarks