GeoGebra

Unsigned GeoGebra Applets

Jump to: navigation, search

With GeoGebra 3.2.31.0 we have introduced unsigned applets and applet preloading to make GeoGebra applets start faster and more easily. Unsigned applets don't allow saving or printing but have otherwise the same features as signed GeoGebra applets. The main advantage is that users don't need to accept a security dialog window when they are using an unsigned GeoGebra applet for the first time.

Contents

Creating Unsigned GeoGebra Applets

All new applets created with GeoGebra 3.2.31.0 are unsigned by default. Just use File, Export Dynamic Worksheet to create an unsigned applet. In the Advanced tab you can see that "Save, Print" is unchecked by default (only signed applets allow saving and printing). Furthermore, you will notice that "ggb-File" and "jar-Files" are also unchecked in the Advanced tab by default. Thus, all you get when you export a Dynamic Worksheet from GeoGebra now is one html file.

A typical applet tag in the html file created for such an unsigned applet will look like this:

 <applet name="ggbApplet" code="geogebra.GeoGebraApplet" archive="geogebra.jar"
         codebase="http://www.geogebra.org/webstart/3.2/unsigned/"
         width="714" height="447" MAYSCRIPT>
    <param name="ggbBase64" value=" ... ">
      ...
 </applet>

The "ggbBase64" parameter embeds your construction as text into the html file. Note that you can also open such an html file in GeoGebra to edit its construction.

It is now very easy to share this Dynamic Worksheet with anybody. Just put the html file on your webserver or send it to someone via email. That's it! No more ggb-files or jar-files to worry about.

Unsigned Applet Preloading

You have lots of GeoGebra applets on your website and want to make startup of your applets superfast? You can now take advantage of the fact that new users don't have to accept our security certificate anymore. Thus, you can preload our unsigned applet files in the background without the user even noticing it. Here's how to do it.

Let's say you have your own web site with lots of GeoGebra applets. Probably you have some kind of overview page from where you link to other pages with your GeoGebra applets. On this overview page, you can already preload the GeoGebra applet in the background. Just add the following lines towards the end of the HTML code of your overview page:

  <iframe frameborder="0" scrolling="no" 
     src="http://www.geogebra.org/webstart/3.2/unsigned/preload.html" 
     width="1" height="1">
  </iframe>

This preloader won't show on your page, but it will download all GeoGebra applet files in the background. So, when your visitors navigate to your first GeoGebra applet, it will start very fast because all the necessary files are already available. Note that the preloader will only download files when there is a newer version available on the GeoGebra server.

Having Unsigned Jar Files on Your Own Server

We recommend that you use the codebase above on the GeoGebra server as our server is set up to provide highly compressed versions of the jar files. However, if you'd prefer to have the jar files on your own server or offline, here's how to do it:

 <applet name="ggbApplet" code="geogebra.GeoGebraApplet" archive="geogebra.jar"
         codebase="http://www.yourserver.com/yourjarfolder/"  width="714" height="447" MAYSCRIPT>
      ...
 </applet>

You can also preload the GeoGebra jar files from your server. Just insert the following preloader applet into the HTML code of your main page or overview page:

  <applet code="geogebra.GeoGebraAppletPreloader" archive="geogebra.jar" width="1" height="1"
      codebase="http://www.yourserver.com/yourjarfolder/" >
  </applet>

Converting Old GeoGebra Applets

You can also use unsigned jar files for your old applets that are using ggb-files. This will work as long as the jar files, the html file, and the ggb file of your dynamic worksheet are on the same server. You will also need to change your applet tag slightly to look like the one shown above: always use archive="geogebra.jar" and specify the jar location in codebase. We strongly encourage you to use the same codebase for all your applets instead of putting jar files in many different locations. This will allow caching of the jar files and avoid lots of unnecessary downloads.

 <applet name="ggbApplet" code="geogebra.GeoGebraApplet" archive="geogebra.jar"
         codebase="http://www.yourserver.com/yourjarfolder/"  width="714" height="447" MAYSCRIPT>
     <param name="filename" value="yourfile.ggb">      
          ...
 </applet>

For offline applets (on a disk or USB drive) where the jar files reside in the same folder together with the html file and the ggb file, use ./ as a codebase:

 <applet name="ggbApplet" code="geogebra.GeoGebraApplet" archive="geogebra.jar"
         codebase="./"  width="714" height="447" MAYSCRIPT>
     <param name="filename" value="yourfile.ggb">      
          ...
 </applet> 


For questions, please visit the Technology forum at http://www.geogebra.org/forum