On client side i am using jQuery and JSP and server side i am using Spring MVC. My question is can we send and receive data in compressed format i.e a client and server will exchange its data in a compressed format. How can i do that? please anybody explain me in brief. An example be too good.
you can try GZIP-ing the response sent from the server. This link might help .
sidenote: AFAIK, JSP is server side, not client side
Related
I'm coding a private webapp that can pick some data from a source (yfinance, panda, ...) and generates a time series. Basically, I want to be able to click on any of the Dow Jones stocks with an HTML btn or whatever, which will send a request to my backend server to generate such chart using python, R or any alternative.
Two possibilities:
I generate the chart and figures on the client's side, by sending the data from the server to the client on a JSON format (which seems really unproductive).
Or, I make all computations on backend, following an HTTP request from the client, generate the chart and send it to the client (my computer).
The question is, can I send such chart, from the server to the client without uploading it as a png and transmit the link through AJAX etc. May I get the output of a python function and send it ?
To summarize: Can a .png file might be sent from a server to an online webapp, any ideas ?
Thanks for your comments, this is a technical question and this might be useful for future requests. Also, I plan to code everything using Django framework.
Planning everything so nothing has been built yet.
I would like to know if AngularJS can save some file without need of NodeJS, PHP, Java or similar server side technology. Just pure JavaScript. I have seen many examples of AngularJS upload scripts. But it did not fully understood if AngularJS alone can do it. In those examples, files seem to be uploaded as blob, and then represented automaticly in browser when upload occurs. But that file or image is never saved on server, I mean on the disc of the server. I would like to achieve that.
I have checked this links:
File Upload using AngularJS
AngularJS: how to implement a simple file upload with multipart form?
But seems or mentioned blob technique is used, or it is some server side technology involved. I would like to have upload script where I would not have to worry about server-side handling, so if possible, upload would be done all via AngularJS/JavaScript.
So can it be done, with pure AngularJS/JavaScript?
I would appreciate the example..really don't know how to do this?
AngularJS is client side code only. By it self it has no power over the server from which it served. After the code is sent to your browser it has no connection or reference to the server side environment.
So the short answer is no.
The long answer is that you need a script/program running on your server which can handle the file input from a request. That request can be simple multi-part upload or a two way web socket connection, but anyway you need a logic which handles on the server side the request. Because Node.js server is written in JavaScript, you can write a full JavaScript implementation of file upload, but that's no longer just a simple AngularJS code.
I have a moderately large JSON data file and I want to access it from the JavaScript code on my web page. What is the simplest way to do that? Should this be done on the client side, or is it better to do that on server side?
It can't be done on the client side. Use server to read and print content on page in needed for javascript format. If you want save it you also need to send content to server.
I develop web application that supposed to communicate with server using jQuery/AJAX/JSON. Just was curious, is it possible to compress somehow text data before send it to server and extract it there? Are there any already implemented JavaScript compressors?
In other words, how to implement next scenario:
Compress text data on client side using JavaScript
Send compressed data to the server
Decompress data on the server side
any ideas?
Yes, any compression algorithm written in JS will do, or look into setting compression settings in the HTTP headers of the requests you're sending.
I need to insert sample data into SQl server.
But i should use HTML,Javascript,JQuery,Ajax,XML only.
I can't use asp.net or php programming languages , because i will not use IIS for this project.
Is there any option to do this?
Hi,Is possible to connect to SQL from XML page.
You need to have a server side page to handle your ajax request where it will read the data coming from ajax request and send to the db.
If you do not want to use IIS, you can think about PHP as your server page which works on Apache server.