Welcome to WebmasterWorld Guest from 50.19.34.234

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Defer for php

     

Gemini23

5:29 pm on Apr 12, 2012 (gmt 0)

5+ Year Member



I have a php script that brings in a search box (and results) from an external website... a problem arises when the external website is down for maintenance and my website takes 'forever' to load while it is waiting for the php script... (which won't run) is there a 'defer' equivalent for php so that the page will at least load without the search box php query

Any suggestions on how to resolve this?

enigma1

10:38 pm on Apr 12, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



If you're connecting say with fsockopen or curl you can specify a timeout for the request. If you don't specify anything the default is something like 30secs. So you could change it to be few secs instead.

incrediBILL

12:25 am on Apr 13, 2012 (gmt 0)

WebmasterWorld Administrator incredibill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Another thought might be to put this content in an iframe, so then your page load speed would seem snappy and their content, however slow or even a timeout, wouldn't impact the rest of your page.

Gemini23

12:37 am on Apr 13, 2012 (gmt 0)

5+ Year Member



But surely iFrames are not good with search engines?

incrediBILL

2:07 am on Apr 13, 2012 (gmt 0)

WebmasterWorld Administrator incredibill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



You said it was a search box from an external website, so I assumed that content wasn't your actual content and having it indexed opposed to pages load speed wasn't a primary concern. If I'm wrong, then other timeout limiting solutions listed above would probably work better but page load time will always be a concern. Besides, these aren't your dads search engines, they can handle frame content unlike back in the day, but it's still not optimal results.

More importantly, aren't you concerned with dupe content by including a 3rd party sites search results or are the search results directly derived from your site?

Gemini23

10:01 pm on Apr 14, 2012 (gmt 0)

5+ Year Member



Thanks incrediBill.. the off-site content is taylored for my site and comes from a database... the alternative is to bring the content in via xml... every day and usually in the early hours of the morning in my time zone (but we sell world-wide)the php content goes off-line for a minute or two... but becoming more frequently is an extended period of being off-line which then slows down the loading of my site considerably.

Gemini23

10:01 pm on Apr 14, 2012 (gmt 0)

5+ Year Member



Thanks incrediBill.. the off-site content is taylored for my site and comes from a database... the alternative is to bring the content in via xml... every day and usually in the early hours of the morning in my time zone (but we sell world-wide)the php content goes off-line for a minute or two... but becoming more frequently is an extended period of being off-line which then slows down the loading of my site considerably.

Gemini23

10:43 pm on Apr 14, 2012 (gmt 0)

5+ Year Member



Could an "Object" be used to contain this php external content? and would that then load AFTER the page load?
 

Featured Threads

Hot Threads This Week

Hot Threads This Month