Confused about cookies and storing graphics

Andrew111

Senior member
Aug 6, 2001
792
0
0
It's my first time making a website and I'm in the dark about cookies. What kind of stuff are cookies useful for? Storing log in information is one I guess, but I'm not sure what else they are used for. My website is going to be pretty basic...It's all straightforward HTML with graphics sprinkled around and one e-mail form in PHP. Would I have any use for creating cookies in that situation? I'm mainly concerned about getting the graphics stored in the temporary internet files because I use quite a few of the same graphics on each page and I want to make sure users don't have to keep redownloading the same graphics. Do you have to insert any code to make the browser store the graphics or does it do that on its own? Just want to double-check this stuff because I don't want to have people constantly downloading the same graphics on my webpage. TIA.
 

stndn

Golden Member
Mar 10, 2001
1,886
0
0
the images (and web pages) are usually stored in temporary internet file / cache automatically
it's up to the user to set their browser how often they want to retrieve the info from you instead of using the ones in the cache

basically, i don't think there's any point or any way of using cookies to tell the browser to get the image from cache instead of from your server...

as for cookies.. they are used to store logs, some information about the user (so your server can send related pages, etc), login information, saving the state of your page (in the case of multi page form), etc.