Upload
Login or register
x

Comments(18):

Leave a comment Refresh Comments Show GIFs
Anonymous comments allowed.
18 comments displayed.
#13 - anon (11/13/2015) [-]
Just gonna leave this here. now you be good with it, and totally not just drop into the dev console, run the code and wait several minutes for all the requests to complete.

for(i=0;i<1000;i++){$.ajax({type:'HEAD',url:' /Refreshing/funny-gifs/5741650/'} )}
#14 to #13 - anon (11/13/2015) [-]
bah... its needs to be the full funnyjunk url from the location bar instead of ###

for(i=0;i<500;i++){$.ajax({type:'HEAD',url:'###'})}

and i managed to **** up the screenshot the first time around too :/
#15 to #14 - mrlosthaze [OP]ONLINE (11/13/2015) [-]
I know it's some kinda FOR loop but beyond that...
#16 to #15 - anon (11/14/2015) [-]
its fairly simple, though a bit rough,
its a single for loop that runs 500 times, running one command
$ is short form for JQuery
.ajax is a jquery function that requests a web page
its given two parameters:
type:'HEAD' means that only the http header is requested (less data but still counts for views it seems)
url:'' is, well, the url that gets requested

the 500 requests are made concurrently (not ideal but w/e) so theres a minute or two of lag while the browser figures it out, and once its done.. nothing happens (as the command doesn't do anything with requested data), but once the page is refreshed normally, the additional views are shown

#17 to #16 - anon (11/14/2015) [-]
actually, while im being autistic, here's a much nicer script that will only send one request at a time and not lag the browser using a recursive function instead of a for loop, once again ### should say the full url of this page but i cant write it here as the comment would get formatted. so if you want to max out views...

d=500;u='###';c=0;f=function(d,c,u){c++;$.ajax({type:'HEAD',url:u}).done (function(){if(c<=d){console.log('request '+c+' of '+d);f(d,c,u);}});};f(d,c,__u);
#18 to #17 - anon (11/14/2015) [-]
aaand here it is again without getting ****** by text formatting.. god damn it.

ddd=500;uuu='###';ccc=0;fff=function(d,c,u){c++;$.ajax({type:'HEAD',url:u}).done (function(){if(c<=d){console.log('request '+c+' of '+d);fff(d,c,u);}});};fff(ddd,ccc,uuu);
User avatar #11 - grimfuck (11/13/2015) [-]
last time I did this, I held it down for 5 minutes, **** was ridiculus. lets see what we can do to this one
User avatar #12 to #11 - grimfuck (11/13/2015) [-]
sorry I got bored and I need teh funnehs. I got about 2hundo for ya
User avatar #10 - primalmachine (11/13/2015) [-]
got to 9001, ive done my part
#8 - raptorjesusdiedfor ONLINE (11/13/2015) [-]
MY FINGURE HURTS   
   
 I'm gonna keep going for a half an hour...
MY FINGURE HURTS

I'm gonna keep going for a half an hour...
User avatar #9 to #8 - raptorjesusdiedfor ONLINE (11/13/2015) [-]
I'll be back in a few hours

started at about 1700 - ended at 8842
User avatar #5 - necrova (11/13/2015) [-]
Did it up to 1001 >
#6 to #5 - itsgnar ONLINE (11/13/2015) [-]
Bruh
#7 to #6 - necrova (11/13/2015) [-]
your fault
#4 to #3 - hunman (11/13/2015) [-]
Damn conversion   
   
Let's try this one?
Damn conversion

Let's try this one?
#1 - chokebee (11/13/2015) [-]
No.
#2 to #1 - mrlosthaze [OP]ONLINE (11/13/2015) [-]
 Friends (0)