Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3636570
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:02:59+00:00 2026-05-19T01:02:59+00:00

I am trying to use jsonp to solve a page performance problem I’ve been

  • 0

I am trying to use jsonp to solve a page performance problem I’ve been having. On my site I usually display ads by writing out a script tag like this document.write("<scr" + "ipt src='advendor.com\myad.php'></scr" + "ipt>");. This is all well and good except for the fact that the sites the script tags point to have a nasty habit of being very slow. So when I have a page with 5 ads on it it can hold up my entire pages load time due to blocking from syncronous requests.

So my idea was to make a jsonp call to the ad service which will give me the script tag that needs to be written to the page. The problem there is I get the <script> tag on the page but, the script tag does nothing. Will the script only work if it is written before document.ready?

CLARIFICATION:
Currently we have our server side code making calls to an ad serving system so it determines what ad code I get server side(in this a script tag with a “src=” that points to the vendors site, which generates the actual ad and tracking). What I’m trying to do is stop the ad calls from blocking the loading of my content. So I want content first and then all the ads next. Putting the script tags at the bottom of the page is not an acceptable solution because I need to determine where the ads appear on the page. IE, <div id="adOneHere"><script src="vendorssite.com"></script></div>, I can have as many as five of these ad calls on one page. Each has its own images/tracking/etc…

My problem is similar to the one addressed here, except that I need to get the “script” tag from a centralized server from multiple domains, and I need to do the document.write inside a specific dom element, I’m well versed in jQuery if that helps.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:03:00+00:00Added an answer on May 19, 2026 at 1:03 am

    Turns out this is what I needed(link text). If you need to load script tags that load and execute code after the page load event this is the way to go.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to use SQLite with the PDO wrapper in PHP with mixed
The whole day yesterday I've been trying to solve this but it's proven to
Trying to use an excpetion class which could provide location reference for XML parsing,
Trying to use a guid as a resource id in a rest url but
While trying to use LINQ to SQL I encountered several problems. I have table
I' trying to use a Linq query to find and set the selected value
I trying to use ImageInfo and Jython to get information from a image on
I'm trying to use svnmerge.py to merge some files. Under the hood it uses
I'm trying to use SQLBindParameter to prepare my driver for input via SQLPutData .
I'm trying to use jQuery to format code blocks, specifically to add a <pre>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.