Get total "weight" of a web page ?

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Get total "weight" of a web page ?

Post by bangkok » Mon Jul 23, 2012 9:34 am

Do you know a way to calculate precisely the "weight" of a web page, AKA the total volume images + texts on an URL ?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Get total "weight" of a web page ?

Post by Mark » Mon Jul 23, 2012 10:44 am

Hi,

Write a script that puts the URL into a variable, get the length of the variable and parse the text to get all img tags and embedded objects. Put each additional URL into a variable and add its length to the previously recorded length(s). Repeat this for frames.

Or open a website in Firefox, press command-I (or control-I on Windows) and see the size listed on the General tab.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply