Upload
Login or register
x
Anonymous comments allowed.
12 comments displayed.
#81 - anon (01/07/2016) [-]
would it hurt to use an animate() or fadeIn() in your 'success' call in ajax?i mean it would look smoother. You could also make browsing seem a bit faster by preloading the next 1-2 content/comment pages after the user finished loading this page (unless you prefer it like this because of traffic/bandwidth costs). Also saving the last 2 content/comment pages inside a hidden div would help you with less traffic and load times.
User avatar #82 to #81 - kapios ONLINE (01/07/2016) [-]
forgot to login
User avatar #85 to #82 - admin [OP](01/07/2016) [-]
why save last two div, already cached in client

and all those elements videos imgs would slow a browser
User avatar #88 to #85 - kapios ONLINE (01/07/2016) [-]
you're re-requesting a page's content (actual content & comments) through ajax, i know images are probably cached, but the rest of it is not,as far as i know. but you might be right, its not that important.

depending on the browser, it can be faster. youre basically loading a div with whatever inside, but there are no frames for the client's browser to actually show. it also starts loading only after the user has finished loading the original page they requested. then when they click next, its instantaneous. I can make some tests and show you the results if you want.
User avatar #91 to #88 - admin [OP](01/08/2016) [-]
for future content downloading i've thought about it but only if they haven't scrolled for like 5 seconds it might start downloading...

but it still wouldn't work for videos since downloading any sort of video lags browsers

User avatar #90 to #88 - admin [OP](01/08/2016) [-]
also for the few who use back button i dont think worth it

browsers can't handle many elements
User avatar #89 to #88 - admin [OP](01/08/2016) [-]
rememebr why firefox lagged and slowed down? because any video on the page slowed it massively

so it would greatly slow everything, bad idea m8
User avatar #92 to #89 - kapios ONLINE (01/08/2016) [-]
i actually did some tests and researched it a bit more. Youre right, even if the element css has "display: none", it still affects the browser (maybe at 95% instead of 100%) so its not worth the hassle. oh well
User avatar #95 to #92 - admin [OP](01/08/2016) [-]
also display none takes more cpu power to display then display block or something

for some reason
User avatar #94 to #92 - admin [OP](01/08/2016) [-]
yeah i had a lot of "hidden" comments as display none and it lagged the **** out of my linux ramdisk chromium browser and it renders fast as hell

i just stopped using display none almost entirely and dont show it at the server level
User avatar #93 to #92 - admin [OP](01/08/2016) [-]
i think the "next level" is using javascript to determine how fast the client / browser is

then showing less / more elements based on that

User avatar #96 to #93 - kapios ONLINE (01/08/2016) [-]
yeah i thought display: none would just put the node in the DOM tree and wouldnt render it until you wanted it to be displayed. but nope.

that was my next recommendation but i havent tested a client's power before. Ive only played with the bandwidth/ping etc. Its a good idea actually.

My first guess is you test it by waiting for the user to load the whole page (or not - maybe a specific div) and then make him send you the time it took them for some specific js/ajax executions or css transforms, etc. (there's probably a plugin already on github)
 Friends (0)