NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page How to cookie images

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 11-27-2003, 08:40 PM THREAD STARTER               #1 (permalink)
TWM
Web Marketing Specialist
Join Date: Oct 2003
Location: Texas, USA
Posts: 1,335
TWM is a jewel in the roughTWM is a jewel in the roughTWM is a jewel in the rough
 



How to cookie images


I have a client that has alot of reocurring images on different pages. Right now, they have to load every time. I want to make them cookie or whatever, so it only has to actually load one time so that hen he visits other pages with the same images, its already loaded...c an you do that? and i dont think i am talking about preloading images.. i dont think
TWM is offline  
Old 11-28-2003, 02:52 PM   #2 (permalink)
NamePros Member
 
Mp)Tarh's Avatar
Join Date: Aug 2003
Location: Ontario, Canada
Posts: 98
Mp)Tarh is an unknown quantity at this point
 



Browsers automatically do that, it's called caching.

????: NamePros.com http://www.namepros.com/programming/15691-how-to-cookie-images.html
When a browser visits a page, they find the address of the image and download it into the temporary internet folder.

If you visit another page with the same image, the browser will realise this and get the image from the harddrive rather than from the web server.

If your images have to load every time, check your code. One of two things may be happening here.

1) Your website automatically generates a new image every time you visit a page (PHP or CGI .gif construction). If this is the case GET THAT OUT OF THERE!!! Not only does that take up MASSIVE amounts of memory on the server, it also makes what you want to do impossible.

2) You have a META header or something of the sort on your page telling the browser not to cache. Take these out, and your problems are solved.
__________________
Yeah... I knew that. What?
Mp)Tarh is offline  
Old 11-28-2003, 08:14 PM   #3 (permalink)
NamePros Member
 
NetButch's Avatar
Join Date: Nov 2003
Posts: 38
NetButch is an unknown quantity at this point
 



IN addition to what MP) said.. if you are using a graphics program to make the pages, such as Dreamweaver, or Adobe, or Ulead they will make duplicates of the same image for each unique page name.. for example if you have a graphic on the home page, page 2, and page 3, and its the same exact graphic, the program will name the graphic a different name for each page.. like index_01, page2_01, page3_01.. etc.. so you have three of the same graphic..

you can go back through your code and rename all the IMG= stuff to the same index_01 or whatever so the browser only chaches the image once instead of loading it new for each page visited.

did that make any sense? sorry if it didnt.. I am no linguist.

have fun!
__________________
NetButch ... Catch Your Audience!
www.netbutch.com
NetButch is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 04:05 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger