Hello all,

i was working for a client when i needed a solution to this issue; i crawled the whole web but nothing satisfactory came up.

Later i came with this piece of code that works really good and i have tested it in several browsers and its ok.


 // PERFECT                                                       //
 // -------                                                       //
 // Javascript Code That Initiates a Download with Redirect       //
 // File: feedback.php                                            //
 // Version: 1.0 (Nov 10, 2017)                                   //
 // Description: This Piece of code Initates a File Download      //
 // and at the same time redirect                                 //
 // to a specified page.                                          //
 // Instructions: Go to "".                     //
 // License: Public Domain Software                               //
 //                                                               //
 // John's Tech Hub * * John Onyejegbu            //

 setTimeout(function() {
 var redirectWindow ='', '_blank'); //downloa
 window.location.href = '';// Redirect
 }, 1000); //set redirect time


This piece of code also works within php with an echo function.




Previous articleFormBook Form Grabber Malware
Next articleSeandovi Defensive Cyber Security Training
John Onyejegbu
John Loves to code!!! He loves engaging in challenging tasks, identifying problems in our society and using technology to solve those problems!!! I am a strong software developer with an extensive background in all part of the software development lifecycle. My unique career has given me Experience in not only development, but project management, database design and management, software testing, quality assurance, and disaster recovery planning.