Follow up - Daily hit reduction

Website URL: https://pokemon-empire-pbs.infinityfreeapp.com/Test

Hey!

I’ve got a follow up question to my previous support ticket I created a little while back (Editing .htaccess).

At the moment, I’ve applied lazy loading to the pokemon sprites as the users scrolls, code below

    h += '<td rowspan="2" class="unit_td" align="center"><img loading="lazy" class="unitpic" src="' + imageUrl + '" /></td>';

However, I recently came across this script which seems to do the same thing: Lazyload Unveil - Source code
I was wondering if there’s any benefit to using this new script over what I’ve currently implemented.

Also, I attempted to put all the .js files into one to reduce the hit count however there seems to be a line limit or I was past the allocated 10mb size for the js file which I shouldn’t be as the combination of all the file sizes doesn’t amount to that


I think I was at 36k lines before the file just didn’t save anything past that.

Any help/advice would be great

Cheers guys

probably doesn’t make sense because you already have it defined here
and modern browsers should follow it

HTML, PHP and JS files are limited to 1 MB.

4 Likes

Thanks for the quick response and the recording!

On the second point, according to this article (What is the file/upload size limit - #2 by ChrisPAR) I understood the file size limit to be 10mb on all files apart from HTML and PHP. The files I want to combine into one are the .js files. Unless this article has been updated recently elsewhere?

1 Like

It is best for you to click on one of these two places
so that it takes you to a fresh article, because the rest you see is just a brief overview of the article at the time when the post was created, which the forum automatically creates as if it were taking a screenshot, and that doesn’t have to be true anymore.


Or directly here

8 Likes

Please note that our limits documentation is based more on observation than an authoritative source. Given that Javascript is code, just like HTML and CSS, it’s quite likely that it also falls under the 1 MB limit. But it’s not in the article because we weren’t aware.

3 Likes

Understood. I guess I can just combine the 7 js files into two to account for the file size limit.
Thanks for the help!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.