/    Sign up×
Community /Pin to ProfileBookmark

Help with Post Request?

Hi all,
Here is my code,

<html>
<head>
<script>
function saveFile() {
var html = document.getElementById(“saveHTML”)
if(html == “”) {
return false;
}
document.saveForm.hidHtml.value = html;
}
</script>
</head>
<body>
<form name=”saveForm” method=”post” action=”/save” onsubmit=” return saveFile();”>
<input type=”hidden” name=”hidHtml” value=”” />
<input type=”submit” name=”saveBtn” value=”Save” />
</form>
<div id=”saveHTML” style=”display:none;”></div>
</body>
</html>

“saveHTML” div contains some large html. (Contains a table with 600 rows and 50 columns).

When I click Save button, it takes a long time to save and get response from the server.

There is no problem with the Post size.

But the html content is large, so only it takes long time (I think so).

Is there any other way to do it in a fraction of second?

Correct me, If I am doing anything wrong?

Regards,
Suresh.

to post a comment
Java

2 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliJun 20.2006 — submitting the page should not take too long, its the time that takes for a response to come back that usually kills. SO wonder what is happening on the server side once the data is there
Copy linkTweet thisAlerts:
@ssureshkumarauthorJun 21.2006 — Hi Khalid Ali,

Thanks for your response.

I made a time split up, it says that for an extralarge post data will take only 1 to 3 secs.

But my actual problem is, before sending a large data to server side, my browser hangs for 3 to 5 secs, and then the data goes to the server and the response is coming back within 1 or 2 secs.

Could u please tell me why the browser hangs while transfering large post data to the server? (or) Redirect me in the right direction.

Thanks & Regards,

Suresh.
×

Success!

Help @ssureshkumar spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...