Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 98133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:08:16+00:00 2026-05-11T00:08:16+00:00

I transfer a fair amount of XML from the server to the client, in

  • 0

I transfer a fair amount of XML from the server to the client, in my application (250K-500K each time).

How can I compress it on the server, and decompress it on the client using standard JavaScript? Is it possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T00:08:17+00:00Added an answer on May 11, 2026 at 12:08 am

    First, a scolding and possible workarounds. Second, a possible crazy solution.

    The Scolding

    If you’re sending 250k – 500k back and forth between the client and server, you’re doing it wrong. Look into

    1. Only requesting and sending back the information you need

    2. If there’s information in the XML that doesn’t change often, configure your web-server for aggressive http caching for these requests. Also, consider sending the ‘doesn’t change often information’ down with the initial page request instead of grabbing it from the server

    3. Consider sending down JSON instead of XML. JSON is less verbose than XML and will usually take up less space. If your client-side code NEEDS an XML object, reconstruct it from the JSON you just downloaded.

    4. If you’re using apache, mod_deflate will gzip your data for client that can accept it. Last time I looked into gzip encoding on IIS it did it’s zipping and unzipping on disk, which quickly became a bottle-neck in high load situations (YMMV)

    The Crazy Solution

    If you’re hell-bent on trying the compress-in-javascript route, the LZ77 compression algorithum has been ported to most languages, including javascript.

    Find the analogous code for your server platform, compress the XML, and then feed it to the code found in the link above. To avoid encoding issues, I’d try wrapping the compressed data itself in either XML or JSON when sending it down.

    Javascript compression performance is going to be slow.as.molasses, which is why I discourage this route.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to transfer a database from a SQL Server instance test server to
I want to transfer a large amount of data from F# to an SQL
Im currently wishing to transfer data from a remote server by capturing printed data
I'm trying to transfer some big streams (~1Mb) between DataSnap server/client but to no
In our File Transfer application the network performance was fair but we want to
I need to transfer around 2m records from 4 tables in SQL Server 2008
I want to transfer local resources to a page, loaded from remote server. I
How can I transfer an array from an IFrame running a php script, to
I have to transfer a big array from one server to another using a
There are methods to transfer a CGPoint from one UIView to another and from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.