10/31/2023: Localization News - Dead of the Brain 1!

No, NOT a trick, a Halloween treat! Presenting the Dead of the Brain 1 English patch by David Shadoff for the DEAD last official PC Engine CD game published by NEC before exiting the console biz in 1999! I helped edit/betatest and it's also a game I actually finished in 2023, yaaay! Shubibiman also did a French localization. github.com/dshadoff/DeadoftheBrain
twitter.com/NightWolve/PCENews
Main Menu

Having Trouble Loading The Site

Started by Gypsy, 08/28/2017, 05:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gypsy

Not having problems with any other sites but still it could be on my end I suppose. Sometimes stuff just won't load, or will take forever. Last couple posts I submitted didn't even go through. Anyone else having issues?

Edit: Oddly enough, this went through on the first try. Funny.

Edit 2: A post I submitted 25+ minutes ago went through in another thread 3 minutes ago.

NecroPhile

Ultimate Forum Bully/Thief/Saboteur/Clone Warrior! BURN IN HELL NECROPHUCK!!!

Gypsy

It is. Everything seems to be smooth now, so, extra weird.

NecroPhile

Probably just a porn overload on your computer.  Reboot and take a day off from masturbating and you'll be fine.  :twisted:
Ultimate Forum Bully/Thief/Saboteur/Clone Warrior! BURN IN HELL NECROPHUCK!!!

Gypsy

LOL. Nevah.  :dance:

Everything else was fine though.

SignOfZeta

Yeah, I get the pauses and the reloads and whatnot. Nobody will fix it, nobody who cares can do anything about it.
IMG

NightWolve

Yeah, it's the Google Adsense, and since it pays the bills, Aaron ain't getting rid of it anytime soon...

There's switching to WAP mode... https://www.pcengine-fx.com/forums/index.php?wap2 or that TapaTalk stuff...

The right way is for a script block for an ad to be in a defer tag, and it seems that was adopted as a standard beyond IE. Something like this:

<script src="demo_ads.js" defer></script>

So the idea is the whole page loads first, and then it goes back to run the script blocks with a defer attribute. Details: https://www.w3schools.com/tags/att_script_defer.asp

I should think Google was smart enough to use that, maybe I'll check and see if it's something I can do.

NightWolve

#7
<script type="text/javascript"><!--
google_ad_client = "ca-pub-6617570311747717";
/* Pcenginefx Forums 728x90 */
google_ad_slot = "1645318972";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="//pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

Hmmm, no defer attribute was set... adding it *could* conceivably help... I'll let you guys know if I can find where to change this...

NightWolve

Alright, updated Google's Adsense code to the asynchronous alternative they provide after finding this guide: https://support.google.com/adsense/answer/3221666?hl=en

<center>
<div style="width:728px;height:90px;padding:5px;">
<script src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" async defer></script>
<ins class="adsbygoogle"
     style="width:728px;height:90px;"
     data-ad-client="ca-pub-6617570311747717"
     data-ad-slot="1645318972"></ins>
<script async defer>(adsbygoogle = window.adsbygoogle || []).push({});</script>
</div>
</center>

So, any other HTML/JS code monkey is welcome to offer improvements and I'd be glad to update this. Lemme know if this improves things.

NecroPhile

Pages still never finish loading here (chrome on a windows 7 pc), though they look complete.
Ultimate Forum Bully/Thief/Saboteur/Clone Warrior! BURN IN HELL NECROPHUCK!!!

SignOfZeta

Quote from: NightWolve on 09/13/2017, 10:37 PMYeah, it's the Google Adsense, and since it pays the bills, Aaron ain't getting rid of it anytime soon...

There's switching to WAP mode... https://www.pcengine-fx.com/forums/index.php?wap2 or that TapaTalk stuff...

The right way is for a script block for an ad to be in a defer tag, and it seems that was adopted as a standard beyond IE. Something like this:

<script src="demo_ads.js" defer></script>

So the idea is the whole page loads first, and then it goes back to run the script blocks with a defer attribute. Details: https://www.w3schools.com/tags/att_script_defer.asp

I should think Google was smart enough to use that, maybe I'll check and see if it's something I can do.
First off, thanks so much for working on this issue. You proved me wrong.

Secondly, a serious non-rhetorical question here: DOES it actually pay the bills? Do ads pay when nobody clicks on them or even sees them?

The forum is private so only members can see ads. The people who aren't already running adblockers (I would assume iPhone people) are encouraged to use ad-less versions of the site. So why are the ads there and how much money can that realistically generate and is it more than what a half dozen people here can probably Patreon in the next hour?

I've seen so many times in life people commit themselves to traditional methods even when they don't actually work for them and I have to wonder...do the ads for reverse mortgages and mail order brides and gold-for-cash serve any purpose but making the site look "pro"? Having no access to any numbers I have no way of knowing but it seems unlikely that ads nobody clicks on could be bringing in all that much and it doesn't seem like they would need to. I suppose traffic at the main site could be massive as hell but how much can the hosting of this not too big forum non-public forum realistically be?

What I'm saying is if the server bill is $58 and the ads make $64 then please let's just dump the things and take my money. If it's $5600 a month and the ads help cover that then I guess I've been retyping my posts for a good reason.
IMG

esteban

To build on Zeta's post: if we could raise two-year's-worth of server bills...I'd contribute to get rid of the ads.

:)
IMGIMG IMG  |  IMG  |  IMG IMG

NightWolve

#12
Quote from: guest on 09/14/2017, 09:38 AMPages still never finish loading here (chrome on a windows 7 pc), though they look complete.
Quote from: SignOfZeta on 09/14/2017, 03:36 PMFirst off, thanks so much for working on this issue. You proved me wrong.
I think I got both of ya covered today, my new code is about finished and loads ads with quite a contrasting delay than others have implemented.

Lemme know NecroPhile how this works in your case.

<script defer>

// NW Ad patch
function PushGoogleAds() {
  if ( !window.adsbygoogle )
return;
  var Count = document.getElementsByClassName("adsbygoogle").length;
  while ( Count > 0 ) {
(adsbygoogle = window.adsbygoogle || []).push({});
Count--;
  }
}
window.setTimeout("PushGoogleAds()", 3500);
</script>

So, killed a few hours on this, and came up with combining a little old skool coding with the "setTimeout()" function to delay ad loading further along with the new skool code Google now provides for AdSense (Aaron was still using the 1st synchronous style). The defer attribute seen above in an inline coded script block is not guaranteed to work, but putting the block at the ending </body> tag with the additional 3.5 second time delay I decided upon should really help.

Nutshell: The whole HTML page will be parsed and rendered now, no blocking to contact ad servers for the image/video content, and then a function gets called 3500 milliseconds later (AKA 3.5 seconds) to load the ads... I tried 3 at first, but increased it to 3.5 - it's debatable, Aaron was OK with it upon testing...

Anyhow, I believe this should really help, nobody else does it this way for professional websites which is what led to the rise of ad blocks - this is a pretty unique solution.

I was actually gonna ask Nulltard to help me code this, see if he had any tricks up his sleeve, but yeah, I took care of it with a little research and from my own web coding experience in IT.

Quote from: SignOfZeta on 09/14/2017, 03:36 PMSecondly, a serious non-rhetorical question here: DOES it actually pay the bills? Do ads pay when nobody clicks on them or even sees them?
I remember Aaron mentioned about $160/month or so, but yeah, it likely decreased since he disabled guest viewing to reduce server load. Anyway, at that amount it's quite worth the trouble, especially with Necromancer occasionally clicking on the ads. :) Covers everything, not just domain registration.

esteban

Damn, why more expensive than I thought.

And its only going to increase.
IMGIMG IMG  |  IMG  |  IMG IMG

NightWolve

Interesting, it works way better on my Android smartphone with Chrome. There's only one progress bar action for page loading. After page loads quick, when the 3.5 second timer kicks in to load ads, it happens silently, no progress or hourglass effects occur, very non disruptive, the way it should be!

I guess if there are no bugs with popular browsers, my code is finished and is doing what's needed. Unfortunately the past disruptive, stalling behavior invited a % of folks to use ad blockers... I used to use one also, but after I read Necromancer's point of helping out by torturing yourself to leave them on, I figured I should help Aaron keep the lights on too.

turboswimbz

Ehhh whatever you did it works %1000 times better on my phone and PC.  The ads never bothered me here, except they weren't loading recently.  now they are fine.  Occasionally I even click one because it's interesting, not to buy, but just because if the crazy ads that show up for me.  Did you know you can buy your own half backyard basketball court with all the bells and whistles of the one at your community park for only 8K?  Or that you can hire a tour guide to take you gliding over the Rockies for a mere $1,500 inclusive package? 

Anyway thanks Nightwolve for the fixxxers.
NW: Hey, I made it on this psycho's Enemies' List, how about that ?? ;)
BT: Look at how the fake SFII' carts instantly sold out and were immediately listed on eBay before the flippers even took possession. Look at Nintendo's overpriced bricks. Look at the typical forum discussions elsewhere. You can't tell most retro gamers anything!

NightWolve

#16
Quote from: turboswimbz on 09/15/2017, 08:44 PMEhhh whatever you did it works %1000 times better on my phone and PC.
Cool, and I improved it even more today, thought about additional tweaks! :) Instead of 3 simultaneous calls after the page is fully parsed/rendered, I figured another delay between ad loads to the Google server would ease the loading of ad spots.



I took the trouble to share this here should anyone else find it useful for their website. I plan on using this on my old website since I also subscribed to Google Adense.

** Improve Ad Loading Instructions for Google Adsense **

1) Add once in <head> tag:<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
2) Add up to 3 times wherever you can strategically position the standard 728 x 90 banner ad. Google Adsense allows for 1-3 at max banner ads per page, the code won't serve a 4th so as not to clog up a page from clients who don't care... The client and slot codes in this example are Aaron's, you get these from your Adsense Control Panel if you can subscribe; that tells Google you're you, so you get your money/credit for ads served, etc.
<center>
<div style="width:728px;height:90px;padding:5px;"><ins class="adsbygoogle"
     style="width:728px;height:90px;"
     data-ad-client="ca-pub-6617570311747717"
     data-ad-slot="1645318972"></ins>
</div>
</center>


3) Add once at the very end, before the </body></html> tag for best results. That'll maximize deferral effect, let all prior HTML code be parsed/rendered. The "defer" attribute can't be trusted for inline JS code, but that's solved by the 3.5 second (3500 millisecond) asynchronous delay with the "setTimeout" function.

<script defer async>
// NW Ad Patch
function PushGoogleAd() {(adsbygoogle = window.adsbygoogle || []).push({});}
function PushGoogleAds() {
  if ( !window.adsbygoogle )
    return;
  var Count = document.getElementsByClassName("adsbygoogle").length;
  var DelayTime = 0;
  while ( Count > 0 ) {
    window.setTimeout("PushGoogleAd()", DelayTime);
    DelayTime += 1200;
    Count--;
  }
}
window.setTimeout("PushGoogleAds()", 3500);
</script>

The net result here achieved is ads are loaded in a very gentle way versus before they were jammed all down at once, multiple HTTP requests at once, prone to causing stalling and blocking page-rendering because the older synchronous JavaScript library was being used also...

Well, that's my fix, I don't see any possible further improvement except delay time tweaking, but I think my current values are good enough! :)

NecroPhile

Thanks for the fixenings.  Pages all look fine now, though occasionally an ad will never finish loading... or at least the progress wheel thing keeps spinning - the ads themselves look and behave normally.
Ultimate Forum Bully/Thief/Saboteur/Clone Warrior! BURN IN HELL NECROPHUCK!!!