image upload and page refresh

G

Gary \(Girish\)

Hello:
I am using SA-FileUp to enable members to upload their product
images
to my ISP sever. When member uploaded a new image file, the file name is
replaced with the member ID and the old file is then overwrited.

Here is the problem:
Member can uploaded new image at "Upload page" BEFORE viewing the new
image at the "Detail page" without any problem. However, when member 1st
viewed the image at the "Detail page" and then upload the new image at the
"Upload page", the whole page is blocked more than 1 minute and the browser
will only load the old image unless manually he/she has to manually reload
(netscape) or refresh (IE) the browser.

It should not be the bandwidth problem because I can upload diff image
(with any size) as long as I don't load the old image from the browser
BEFORE
upload the new image to the server. I think the problem is caused by
caching.
I already put expires=0 on both "Display" and "Upload" page but the problem
still exist.

<% Response.Expires=0 %>
<html>
<head>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
</head>

vin=request("vin")
'response.write(vin)

Set upl = Server.CreateObject("SoftArtisans.FileUp")
upl.SaveAs "i:\pp\temp\" + session("rand_id") + ".jpg"
Set objImageGen = Server.CreateObject("softartisans.ImageGen")

response.write("i:\pp\temp\" + session("rand_id") + ".jpg")

objImageGen.LoadImage "I:\pp\temp\" + session("rand_id") + ".jpg"
' Check width of image
img_width=objImageGen.Width
if (img_width>500) then
objImageGen.CreateThumbnail 500,0,2
end if
'Save main image to i:/pp/carmart/photos
objImageGen.SaveImage 0, 3, "i:\pp\carmart\photos\" + vin + "-1.jpg"

'Save thumbnail to i:/pp/carmart/thumbs
objImageGen.CreateThumbnail 101,0,2
objImageGen.SaveImage 0, 3, "i:\pp\carmart\thumbs\" + vin + "-1t.jpg"
session("rand_id")=""
 
G

Garyrek

I tried
<%
pStr = "private, no-cache, must-revalidate"
Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", pStr
%>

didn't work, tried cache isapi thing as well, I have buffer turned on IIS so
tried setting it to false as well still no luck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top