我怎样才能让浏览器在将大型帖子发送到Servermake浏览器之前压缩大型帖子在将大型帖子发送到服务器之前压缩它们 [英] How Can I Make Browsers To Compress Large Form Posts Before Sending Them To The Servermake Browsers To Compress Large Form Posts Before Sending Them To The Server

查看:67
本文介绍了我怎样才能让浏览器在将大型帖子发送到Servermake浏览器之前压缩大型帖子在将大型帖子发送到服务器之前压缩它们的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

我使用REST网络服务,我们必须发送频繁的PUT请求和大型XML文件(70+ MB)浏览器压缩大型表单帖子是不是有意义在将它们发送到服务器之前,这是服务器端解决的问题,还是每个Web应用程序都必须处理它



有什么我可以添加的东西我的java脚本标题在发送到服务器端之前压缩数据

在我的javascript中我已经使用过



Dear All,
Iam using REST web service and We have to send frequent PUT requests with large XML files (70+ MB) Wouldn't it make sense for the browsers to compress large form posts before sending them to the server ,So is this a solved problem on the server side or does each web application have to handle it

is there any thing i can add in my java script header to compress data before sending to server side
in my javascript i have already used

$.ajax({
       type: 'PUT',
       url: URI,
       contentType: 'application/json; charset=utf-8',
       data: "XmLData",
       dataType: 'text',
       accept: 'application/json charset=utf-8'
   }).done(function (ResultData) {
       $('#dvResult').text(ResultData);
   }).error(function (jqXHR, textStatus, errorThrown) {
       $('#dvResult').text(jqXHR.responseText || textStatus);
   });



谢谢


thanks

推荐答案

.ajax({
type:' PUT'
url:URI,
contentType:' application / json; charset = utf-8'
data: XmLData
dataType:' text'
accept:' application / json charset = utf-8'
})。done( function (ResultData){
.ajax({ type: 'PUT', url: URI, contentType: 'application/json; charset=utf-8', data: "XmLData", dataType: 'text', accept: 'application/json charset=utf-8' }).done(function (ResultData) {


' #dvResult')。text(ResultData);
})。error( function (jqXHR,textStatus,errorThrown){
('#dvResult').text(ResultData); }).error(function (jqXHR, textStatus, errorThrown) {


' < span class =code-string>#dvResult')。text(jqXHR.responseText || textStatus);
});
('#dvResult').text(jqXHR.responseText || textStatus); });



谢谢


thanks


这篇关于我怎样才能让浏览器在将大型帖子发送到Servermake浏览器之前压缩大型帖子在将大型帖子发送到服务器之前压缩它们的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆