Ads Slowing the Site (5 comments)

Ads Slowing the Site

Thursday, September 27, 2012 - 10:37 PM

My apologies for the site-wide slow-down, lately. The company that serves up the ads for the Sheldon site has been repeatedly tripping on crucial power cords strewn about its office (or so I surmise)...so everything's breaking over there.

The downside for you and me is that the ads get served up r e a l l y s l o w l y, almost to the point of ridiculous.

So! For now, I've put the ads into iframes, so they'll get served up last. But! Being the half-smart guy that I am, I only kinda-sorta remember how to use iframes, so they're positioned down ten pixels and over ten pixels and regardless it is what it is. :)

TMacManus


Posts: 3

Registered:
Sep 2012
Re: Ads Slowing the Site (Score: 0)
posted Friday, September 28, 2012 - 02:08 AM (#62129)

You must have done something right! Site is loading very nicely/quickly :-)


Locked profile
hotarug


Posts: 1

Registered:
Sep 2012
Re: Ads Slowing the Site (Score: 0)
posted Friday, September 28, 2012 - 02:28 PM (#62136)

If you're interested in fixing the margin problem, replacing the contents of what you currently have in http://www.sheldoncomics.com/includes/ad_300x250ri ght_noiframe.html with the following should work:

<html>
<head>
<script  src="http://tag.contextweb.com/TagPublish/getjs.as px?action=VIEWAD&cwrun=200&cwadformat=300X250&cwpi d=520142&cwwidth=300&cwheight=250&cwpnet=1&cwtagid =127910"></script>
</head>
<body style="margin:0px"></body>
</html>


Locked profile
londonclearance


From: United Kingdom

Posts: 1

Registered:
Jun 2011
Re: Ads Slowing the Site (Score: 0)
posted Tuesday, October 02, 2012 - 02:14 AM (#62147)

The loading of this site is now good.


Locked profile www
junx


Posts: 1

Registered:
Oct 2012
Re: Ads Slowing the Site (Score: 0)
posted Wednesday, October 10, 2012 - 05:31 AM (#62168)

An explanation is so much better than a solution!

Most browsers will set a default margin around an HTML document unless it is specified otherwise. The default for your browser may be 10px as you mentioned, I'm using Chromium on Linux and the margin is 8px inside of your iframes at the moment.

Because this is a browser-default behavior, the only solution is to set the css margins inside of the iframes to zero. It's not a problem in the page, but it's as problem that the browser will add to the page unless you specifically say "hang on, don't do that, bro" in the CSS somewhere.

Any variation on adding:

<style type="text/css">
body { margin: 0px; }
</style>

in the document head will work wonderfully.

And yes, it will have to be added from inside the iframe page itself, you can't modify the iframe css from the parent document. :)

Peace!


Locked profile
Doc
Doc



From: Copenhagen, Denmark

Posts: 9

Registered:
Mar 2008
Re: Ads Slowing the Site (Score: 0)
posted Tuesday, October 30, 2012 - 07:11 AM (#62294)

if you just add a bit of styling, you can get the positioning right.

<iframe frameborder="0" marginheight="0" marginwidth="0" src="adds-iframe.php" height="XXX" width="YYY">


--
A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort.
Locked profile www
Discussion: Ads Slowing the Site | Login/Create an Account | 5 comments
Threshold:  Locked
The Fine Print: The above comments are owned by whoever posted them. The Sheldon site is not responsible for them. However, if you suspect a post has been spammed by a person or 'bot, or that illegal of offensive posts need removal, contact your friendly neighborhood cartoonist.

forums

welcome! please login or register.