: Can I improve load times by reusing images? I've created a website that has multiple pages, and each page has it's own dedicated folder. Inside of each page's folder I've created a dedicated
I've created a website that has multiple pages, and each page has it's own dedicated folder. Inside of each page's folder I've created a dedicated image folder.
I reuse many of the same images (logos, buttons, etc) across the site, but I always link from the current pages dedicated image folder.
Would my images load faster if there was only one image folder (placed in the root folder), and each page used that as the source of its image files? Will this cache the images?
More posts by @Eichhorn148
1 Comments
Sorted by latest first Latest Oldest Best
I reuse many of the same images (logos, buttons, etc) across the site, but I always link from the current pages dedicated image folder.
If the images are in different folders (ie. duplicated) then these are different images and the browser is going to load each separately and not use the cache.
/subdir-1/img/my-great-picture.jpg
/subdir-2/img/my-great-picture.jpg
These two images have different URLs and are therefore seen as different images (even though they might in fact be the same image).
Would my images load faster if there was only 1 image folder (placed in the root folder), and each page used that as the source of its image files? Will this cach the images?
Yes - this is what you need to do. All common images should be in 1 common directory that all pages can access. ... from 1 common stylesheet.
For small decorative images you should also look into CSS sprites.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.