A method and apparatus for extracting and compiling an interpretative
language to implement functions such as those written as a script
embedded in a HTML page in an interactive television environment. HTML
pages are received from both broadcast and online. The compiler runs on a
server. The compiled scripts run faster and require less processing power
to execute. The scripts are extracted from HTML representing content
stored at the server. The compiled script code is then transmitted from
the server to a client device, through broadcast or online, for execution
during content display at the client device. The compiled scripts run
faster, require less processing power to execute, and run on client
devices that do not have the interpreter for that language.