Welcome to WebmasterWorld Guest from 50.19.53.104

Forum Moderators: bill & werty

Message Too Old, No Replies

Rss-to-.JS codes in HTML cause slow page load

     

jcdb

11:18 am on Aug 20, 2004 (gmt 0)

10+ Year Member



Hello
This article is very helpful.
<snip>

Can you help me? I have a slow website (<snip>) and I think the rss-to-javascript codes in my html codes causes the slow page loads. Whithout the codes in the html , my site loads faster (<snip>)

Code start
<script language="JavaScript" src="http://www.domain.com/php/hbphpfeed/feed2js.php?src=http%3A%2F%2Fwww.domain.com%2Fabout%2Frss%2Ffeed.rss&chan=n&num=2&desc=0&date=y&targ=y" type="text/javascript"></script>

<noscript>
<a href="http://www.domain.com/php/hbphpfeed/feed2js.php?src=http%3A%2F%2Fwww.domain.com%2Fabout%2Frss%2Ffeed.rss&chan=n&num=2&desc=0&date=y&targ=y&html=y">View RSS feed</a>
</noscript>
code ends

Is there a way to create an external .js file and link it for my rss feeds?

Thanks

Claude
Owner/Operator
<snip>

[edited by: werty at 4:35 pm (utc) on Aug. 20, 2004]
[edit reason] Terms Of Service #13 [webmasterworld.com] [/edit]

jcdb

11:23 am on Aug 20, 2004 (gmt 0)

10+ Year Member



I mean Rss-to-.JS codes in HTML cause slow page load

jcdb

11:30 am on Aug 20, 2004 (gmt 0)

10+ Year Member



Also, The animated gif banner may play a role in the slow page load but that's not the main cause I think.

<snip>

Please help
Claude

[edited by: werty at 4:35 pm (utc) on Aug. 20, 2004]
[edit reason] Terms Of Service #13 [webmasterworld.com] [/edit]

cogdogblog

4:41 pm on Sep 29, 2004 (gmt 0)

10+ Year Member



As author of the code you are using I can agree that it can slow down your page loading time. There is no end around as you must realize the transactions are going on:

(1) Your page requests information sent to our PHP script, which must process it.
(2) The Feed2JS must then do another request to either get the RSS feed from the site or from our cache files (if it has been more than 60 minutes since caching).
(3) The script parses XML and returns JavaScript content to your page.

There is a fair bit of communication that needs to happen. There is no getting around that to get dynamic content.

If you ran the PHP script on your own server it would be faster. If you used our provided PHP include code it might be a tad faster.

A .js include file would do nothing for you, unless you had your own way to have a script automatically fetch the RSS, parse it, and then update an include file on your server.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month