Home > Technical & Creative Skills > Programming, Servers & Scripts

Afflow Backbutton script slowing down Lander (4)


10-25-2017 05:54 AM #1 eurosen (AMC Alumnus)
Afflow Backbutton script slowing down Lander

Hi,

I have recently started using the Afflow backbutton redirect script but when I check my landers it seems it's really slowing the pages down, some examples:

Click image for larger version. 

Name:	afflow1.png 
Views:	39 
Size:	6.9 KB 
ID:	17325

Click image for larger version. 

Name:	afflow2.png 
Views:	28 
Size:	3.3 KB 
ID:	17326

I am using the standard redirect script copied from Afflow, what could be causing this?

Would it be better to use my own script? If yes, does anyone have the code available?


10-25-2017 09:50 AM #2 platinum (Veteran Member)

@eurosen can you show us a bigger picture of the waterfall results?

One alternative option would be to add your own backbutton script that goes to your afflow link

Code:
<script type="text/javascript">
! function () {
var t;
try {
for (t = 0; 10 > t; ++t) history.pushState({}, "", "#");
onpopstate = function (t) {
t.state && location.replace("yourafflowlink")
}
} catch (o) {}
}();
</script>


10-25-2017 10:10 AM #3 caurmen (Administrator)

Don't forget to put that code just before the closing </body> tag in the lander so it doesn't cause any slowdown. Shouldn't be too much of an issue anyway.

The original waterfall looks like it's being caused by a lengthy lookup to another site. You could just copy the code from that inline into your lander, alternatively.


10-25-2017 01:15 PM #4 eurosen (AMC Alumnus)

Hello Everyone,

I have replaced the script with the one Platinum mentioned and the problem has been solved.

It seems that when using the Afflow script it does a lookup to Afflow causing a delay in loading the lander.

Thanks for your replies.


Home > Technical & Creative Skills > Programming, Servers & Scripts