Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make main code asynchronous #9

Open
dugwood opened this issue Jan 9, 2017 · 4 comments
Open

Make main code asynchronous #9

dugwood opened this issue Jan 9, 2017 · 4 comments
Assignees

Comments

@dugwood
Copy link
Owner

dugwood commented Jan 9, 2017

Currently the ClickHeat main code (clickheat.js) is loaded synchronously, which is a bad design.

It should be rewritten with push() function so that the main code can be called asynchronously.

@dugwood dugwood self-assigned this Jan 9, 2017
@dugwood dugwood changed the title Make may code asynchronous Make main code asynchronous Jan 9, 2017
@CloverYouQuan
Copy link

Hello, how do I solve this problem? Forbidden domain ('.$referer['host'].'), change or remove security settings in the config, the,

@dugwood
Copy link
Owner Author

dugwood commented Jan 28, 2018

@CloverYouQuan there's absolutely no reason to post this here. Use the support (https://www.dugwood.com/s/index.html) or open a new issue.

@hubyhuby
Copy link

Dear @dugwood ,
I can confirme from my experience that the tracking code is slowing down greately the user interface.
This tends to make PWA / Apps unusable. We had to remove the tracking code.
Basically when clicking each menu of the app you would have to wait around 1,5 seconds, to have the interface reacting.
Without the tracking code it is below 0.5 seconds and feel snappy.
Maybe users will not notice it on old school Html / non reactive interfaces.
Asynchroneous is a must have for Apps like ours.

@dugwood
Copy link
Owner Author

dugwood commented Feb 18, 2019

@hubyhuby I think you've got another issue.

This post is about loading ClickHeat asynchronously, possibly losing some clicks.

Your concern is when someone actually clicks your application. You may add clickHeatWait = 0 before the main initialization, as it adds a 500ms delay by default (so that the click is correctly recorded before leaving the page). I'm not really fond of this solution, but it's how it's done for many years...

With new browsers it may be avoided some other way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants