News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Importing HTML?

Started by Col, January 20, 2006, 04:24:53 PM

Previous topic - Next topic

Col

Hi,

Is there any way of displaying a table, but importing the code to the page. I have a table that I wish to display on most pages, but there is fair bit of bandwidth to be saved if I can do this. I know I could use an iframe, but from experience, the table height cannot be guaranteed across browsers, unless someone here knows different?

Thanks.

sm2k

Since your objective is to save bandwidth, you'll need to do this from the client side.  The only way I can think of would be to use javascript to spit it out.  This will only work if the client has javascript enabled.

I would first determine the size of this table and multiply that by the number of pageviews you're getting per month to see if the potential bandwidth savings are really substantial.  If not, don't bother. 

Col

Thanks for the reply.

9KB, but since it will not appear on most pages, it seemed worth doing, so long as there were no down sides. Using JS makes it a no-no really. Maybe if I end up moving it to somewhere that is a bit more forgiving if its length varies a little frm browser to browser, I can still use an iframe, but not for now.

Again, thanks.

Advertisement: