SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Only one resource, yet shouldn't get?

    Hi guys,

    This isn't really "css" related, but I'm pretty sure it has something to do with the CSS :/

    http://www.cancunandrivieramaya.com/test.html

    I keep getting this stupid error - but I can't work out where its coming from:

    Minimize DNS lookups
    The domains of the following urls only serve one resource each. If possible, avoid the extra DNS lookups by serving these resources from existing domains.

    * http://www.cancunandrivieramaya.com/test.html
    Its been driving me nuts for hours - and I still can't find the issue. I've checked all the HTML + the CSS/JS files (all images etc are accessed via carmstatic.com, so we can avoid the "serve files from a cookieless domain"), but can't see anything - am I missing something stupid?

    BTW, I've even gone as far as seeing if putting a "blank"pixel image at the bottom of the page helps (to trick it into thinking that more than 1 resource is coming from the domain)

    TIA

    Andy

  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,746
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    This has nothing to do with the CSS, CSS doesn't mess with the server and DNS.

    This is probably apache or some other server side thing..I don't know what it wotuld be but I know for sure it isn't CSS
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  3. #3
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by RyanReese View Post
    This has nothing to do with the CSS, CSS doesn't mess with the server and DNS.

    This is probably apache or some other server side thing..I don't know what it wotuld be but I know for sure it isn't CSS
    Hi,

    Thanks for the reply I finally tracked it down to this code:


    Code:
    function load_top_ad() {
    	var thehtml = jQuery.ajax({
    	  url: '/cgi-bin/gallery/ad_frame.cgi?area=Top;do=',
    	  async: false
    	 }).responseText;
    	jQuery('#banner_ad').html(thehtml);
    }
    Even though using a relative path, it still seems to think that its actually accessing the main domain.

    Ah well - not a major biggie (95/100 isn't exactly a bad score =)) ... and using the AJAX for the banner also lowers the page loadtime, which is one of the main things we were aiming for

    Cheers

    Andy

  4. #4
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,746
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    The javascript will use that relative path based on where the Javascript file is, aka if you call a JS file at http://www.sitehere.com/js/thingy.js, then it will go and try and access the relative path from that location, thus the main domain .
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  5. #5
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah ok - so not a lot I can do about it =) (we obviously can't have it served from the other domain, i.e carmstatic.com, as AJAX doesn't let you do cross-domain accessing, which is a bit of a sod )

    Cheers

    Andy

  6. #6
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,746
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Well AJAx doesn't because it's just Javascript, but you could use PHP and feed the PHP to AJAX.

    But we are overthinking it now aren't we
    Always looking for web design/development work.
    http://www.CodeFundamentals.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •