enctype="multipart/form-data" performance?

R

Rob

I've got quite an already complex form to which I need to add a upload photo
facility. I know how to do this but wondered if adding the form tag to
include enctype="multipart/form-data" makes a big performance difference to
the form when a photo isn't been uploaded?

Thanks, Rob.
 
A

Anthony Jones

Rob said:
I've got quite an already complex form to which I need to add a upload photo
facility. I know how to do this but wondered if adding the form tag to
include enctype="multipart/form-data" makes a big performance difference to
the form when a photo isn't been uploaded?

It won't make a great deal of difference. Certainly by far the biggest cost
will the time it takes to send the extra characters over the wire but
that'll be small change if occasionally the data contains a photo.

If it is a real concern then onsubmit event of the form you could test the
photo field value to see if it contains a file name then set the enctype
(encoding in JScript on IE) to your prefered type.
 
M

Mark Rae [MVP]

I've got quite an already complex form to which I need to add a upload
photo facility. I know how to do this but wondered if adding the form tag
to include enctype="multipart/form-data" makes a big performance
difference to the form when a photo isn't been uploaded?

None at all.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top