curl javascript equivalent

Right now I have a script that download a file via PHP CURL. I was wondering if there is a javascript equivalent to curl from which a download can be initiated as coming from the local browser and not the server itself? I would also need to gather stats similar to curl info.
ITNCAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
Using jquery it is easily possible
https://github.com/johnculviner/jquery.fileDownload

Using plain js would be a major PITA
What kind of stats - this isn't anything like curl
0
ITNCAuthor Commented:
I was hoping to at least get the download size and speed. Those two are a must. I was looking through the documentation and so far I haven't seen if that is possible.
0
GaryCommented:
This maybe better handled through an ajax request to your server that uses curl and returns the data.
You can get the header, as for download speed
http://www.smashingmagazine.com/2011/11/14/analyzing-network-characteristics-using-javascript-and-the-dom-part-1/
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

ITNCAuthor Commented:
That is actually my current setup. The thing is I need the request to come from the client machine so it is routed in through the LAN port of my pfsense router and then out the WAN. Apache is running on the pfsense router so when it makes the request with this current setup it is not routed through the LAN. If that makes any sense haha it's hard for me to give many more details.
0
GaryCommented:
What will happen to the downloaded file?
0
ITNCAuthor Commented:
after download it can be discarded, the stats are what I need to collect.
0
GaryCommented:
I think this is beyond the scope of javascript with any degree of reliability, this is more in the realms of Java
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.