Results 1 to 7 of 7

Thread: Download data received by server push during https connection

  1. #1
    Join Date
    Dec 2015
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Download data received by server push during https connection

    A Web page use a server push technology to send continuously an update to my web browser page, to which I have previously authenticated via https.

    Is it possible to write a Javascript code in order to download the data provided from the server web page sent using https using the credential already provided in another Firefox tab ?

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    JavaScript alone cannot download data from the server. You would need to incorporate a server-side language, such as PHP, in order to communicate with the server via your web page (e.g. A timed post request to a PHP file sent via Ajax?)

    As for communication between browser tabs/windows (from the same domain), it's possible - although I've never personally tried - but you can start your research here https://www.google.co.uk/search?q=co...n+browser+tabs
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #3
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    It depends on what you mean by 'download'. If you just mean 'show the data', you could use an iframe or a text/html-object.

  4. #4
    Join Date
    Dec 2015
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks to Beverleyh and molendijk for answers.
    The browser already receives continually updated data from the server in push mode. I would like to save in a file (in append mode) all received data.
    Correct me if I'm wrong !
    Last edited by famedoro; 12-29-2015 at 08:12 AM.

  5. #5
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    What data are we talking? If it's text-based, you can automate a dump into Excel or something (I believe I saw that mentioned when I posted the Google link before), or save it to Local Storage, or show it on screen as molendijk suggested (text-based content is, or can be made to be, harmless, so that would be easier to get on to a local computer in an automated fashion), but with a file download, which could be an .exe or something else potentially harmful, there is usually a browser prompt for a user to respond to; confirm download and save location type-of-thing. As a browser security feature, I'm not sure you can circumvent that - let's face it, if you could, spam-kiddies would be downloading nasty stuff on to everyone's computers. Another option could be to automate an email and send whatever data to a dedicate email client, but still, the physically act of moving it from web to your local computer is likely to require human intervention.


    I guess the questions you should answer in order to begin more targeted research are;

    - What do you mean by 'download'? / what kind of 'download'?
    - what data/file format are you attempting to download?
    - where does the downloaded data end up?
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  6. #6
    Join Date
    Dec 2015
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The data are text-based data which the browser continuously receive and it allows the update of a table in a browser web page. I would like to save the flow of textual data the the server send - "push" - to the browser.

    The browser is connected to a server in https, which through push technology as the data changes send text updates to the web page. I'd like to save to a local text file these data.

    The received data are like these:

    1Last#PRC#0#0#SEDCORR#LAST
    #2 1Var.%#VAR#0#1#SEDCORR#
    #DESCRIPTION#0 1
    #PRC###SEDCORR#REFERENCE_PRICE#0 1
    #TXT#5#1#SYSTEM#PHASE#0 1Ora#DTE#0#7#SEDCORR#TIME_LAST

    which will then be formatted from the webpage in appropriate table.

    Quote Originally Posted by Beverleyh View Post
    What data are we talking? If it's text-based, you can automate a dump into Excel or something (I believe I saw that mentioned when I posted the Google link before), or save it to Local Storage, or show it on screen as molendijk suggested (text-based content is, or can be made to be, harmless, so that would be easier to get on to a local computer in an automated fashion), but with a file download, which could be an .exe or something else potentially harmful, there is usually a browser prompt for a user to respond to; confirm download and save location type-of-thing. As a browser security feature, I'm not sure you can circumvent that - let's face it, if you could, spam-kiddies would be downloading nasty stuff on to everyone's computers. Another option could be to automate an email and send whatever data to a dedicate email client, but still, the physically act of moving it from web to your local computer is likely to require human intervention.


    I guess the questions you should answer in order to begin more targeted research are;

    - What do you mean by 'download'? / what kind of 'download'?
    - what data/file format are you attempting to download?
    - where does the downloaded data end up?
    Last edited by famedoro; 12-29-2015 at 09:41 AM.

  7. #7
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Ok, so it sounds like you have the answers to begin your research.

    So, maybe start at the end and work backwards in stages? First try Googling "how to save data from the server to a local text file", assess if what you want to do is actually possible, try out a few tutorials or script snippets and take it from there.

    If you need further help, please post *your code* and then folks here can chip in with suggestions.

    Alternatively, if you'd like somebody to write the code for you, you can hire a developer or post a request in the General Paid Work Requests forum http://www.dynamicdrive.com/forums/f...-Work-Requests
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

Similar Threads

  1. Fake Server Push PHP ( help Please )
    By enigma43 in forum PHP
    Replies: 0
    Last Post: 11-25-2010, 04:50 AM
  2. FileZilla connection refused by server
    By chopficaro in forum PHP
    Replies: 4
    Last Post: 12-29-2009, 11:05 PM
  3. WebService = faultcode : Server.Connection
    By tomyknoker in forum Other
    Replies: 2
    Last Post: 10-20-2006, 05:17 AM
  4. WebService = faultcode : Server.Connection
    By tomyknoker in forum CSS
    Replies: 0
    Last Post: 10-19-2006, 11:36 AM
  5. detect connection with the server
    By joecool2005 in forum ASP
    Replies: 1
    Last Post: 08-09-2006, 04:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •