Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Well, thats an excellent point.. and if SSIs wouldn't do, I could always use something like HTML::Template's TMPL_INCLUDE system to do the same thing.

However, there is an advantage to using the <script src=...> -- When you use it, you are allowed to include a host other then the one the original HTML file was loaded from. So if you're browser requests
http://www.foo.com/pizza.html

pizza.html can contain the line:
<script src="http://www.bar.com/pepperoni.js">
And thats actually legal. Now, it maybe possible to do something similar with SSI. However, you could use those script lines to load JavaScript after the original document had been loaded.. dynamicly choosing which document to load. Lets say, in our pizza example, that the user has three buttons -- one labeled pepperoni, one sausage, and one pinapples. By clicking one of them, you can use a hidden frame to have the browser go out and grab that JavaScript file -- whatever site it may be on, without making the browser reload any content.

I hope that made sense :-) I have a project that makes use of this sort of thing, called OpenThought. It's all about delivering content to a web browser without making the pages reload. The code will be in CVS within a day, and you can read the current documentation at the website.
-Eric

In reply to Re: Re: Re: Re (tilly) 1: Compressing/Obfuscating a Javascript file by andreychek
in thread Compressing/Obfuscating a Javascript file by Incognito

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (6)
    As of 2014-12-22 05:39 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (110 votes), past polls