| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Images cached by browser | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Images cached by browser
How can I make the images be cached by the users browser so they don't have to download every time a user goes back to a page? Is this a setting in config.php?
I only want the images to download if the image is new. |
|||||||
#2
|
|||||||
|
|||||||
*Bump*
Anybody? |
|||||||
#3
|
|||||||||
|
|||||||||
Make sure you have your x-cart set to store images in the filesystem not the database.
3.4.3 and over will use proper image URLS so the browser will cache. If you are storing in the database it will download the files everytime.
__________________
Groovico Used by X-carters the world over: Marketing Manager Pro Bundle For X-cart Featured Product Manager for X-cart Feed manager pro for X-cart http://www.firetanksoftware.com Celebrating 7 Years of providing quality X-cart Add ons and X-cart Mods for x-cart 3.X to X-cart 4.4.X |
|||||||||
#4
|
|||||||
|
|||||||
Sorry. I did a little digging and it's only the subcategory icons that are not caching. I'm using the mod to allow images for subcategories so they get urls like
Code:
Looks like I need to find a way to make them read to the actual file to have them cache. |
|||||||
#5
|
|||||||||
|
|||||||||
Yup you're right about that part, they missed out the URL stuff for that area for some reason.
__________________
Groovico Used by X-carters the world over: Marketing Manager Pro Bundle For X-cart Featured Product Manager for X-cart Feed manager pro for X-cart http://www.firetanksoftware.com Celebrating 7 Years of providing quality X-cart Add ons and X-cart Mods for x-cart 3.X to X-cart 4.4.X |
|||||||||
#6
|
|||||||
|
|||||||
What can I do to the code to make it work to allow caching?
The mod code looks like this: Code:
So they are calling the subcat icons with this line: [img]../icon.php categoryid={$subcategories[cat_num].categoryid}[/img] And I want the browser to cache the image so I guess I need the code to be written to the page as a true url to the image. How can I do that? Do have to make a new tpl file for the sub cat icons that functions like the product_thumbnail.tpl file? Is that what generates the true urls for the thumbnails? How would I implement that? |
|||||||
#7
|
|||||||
|
|||||||
*Bump* anybody?
|
|||||||
#8
|
|||||||||
|
|||||||||
Well.... You will need to make a new .tpl file based on the product_thumbnail.tpl file. Probably call it cat_icon.tpl....
You will also need to add a function to the func.php file to read the file path from the 'icons' table, and call this function from within the categories.php file and add the results to the $subcategory array. After you do this, you can call the icon in a similar way that you do with the thumbnails.. ie. {include file="cat_icon.tpl" categoryid=$subcategories[cat_num].categoryid icon_url=$subcategories.icon_url} |
|||||||||
#9
|
|||||||
|
|||||||
Quote:
Thanks!! That totally points me in the right direction |
|||||||
|
|||
X-Cart forums © 2001-2020
|