Minimal Download Strategy (MDS) is a new technology in SharePoint 2013 that reduces the amount of data that the browser has to download when users navigate from one page to another in a SharePoint site. When users browse an MDS-enabled site, the client processes only the differences (or delta) between the current page and the requested page.
Here is the code, you can put this code in the master page when page loaded:
Why I need to call my script everytime navigate to another page? I have an requirement need me call custom script only for Documents library, so everytime user navigate to another link my code will be checked if this link has a Forms in the url, I will get the document name and get the information of this document to archive the requirement.
Notes: This blog just is a note for reference if needed, and I hope someone have the similar can help.
I know my english is bad :)