Adding PDF button slows down the page

Adding PDF button slows down the page

databodydatabody Posts: 11Questions: 3Answers: 0

I added PDF button on the page and after that it take 10 to 15 seconds to load the page. But when you click on PDF button to download file then it works fine without delay. Only problem is in loading the first page which contain PDF button.

I suspect it is due to pdfmake.min.js file which is 1MB minified. But then the examples given on this website datatables.net also use same file and they load very fast. I am hosting all JS and CSS files locally.

Then I thought may be this file references some outside websites and internet is blocked on server where I am hosting but when I inspect network traffic in browser then I don't see any outside traffic.

Why is it slow?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598
    Answer ✓

    As you say, it shouldn't make a difference - the presence of the button doesn't do anything in addition, it only kicks into action when clicked!

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • databodydatabody Posts: 11Questions: 3Answers: 0

    Ok I found out that the loading issue is in IE11. On Chrome and Edge it loads fast.

Sign In or Register to comment.