Is there a way to cache documents in JEditorPane ?

I am using a JEditorPane to load html pages.
some of my pages are quite big and take some time to load. I would like to cache the pages so the next time the user loads a cached page, the page will load very quickly.
It seems that what I need to cache is the html document that represents the model. However using JEditorPane setDocument( ) method with the cached document takes the same time as loading a new page.
so perhaps i need to cache the views also ?
thanks.

1. I load documents only from the local drive.
2. The pages I load can be quite big.
3. I load the pages synchronically
I have measured a bit of times for loading a big page.
when the page is new it takes 11 seconds to build the document. with a cached document it takes about 7 seconds.
the painting of the views takes little time.
my question is: if I supply the editor pane with a fully built document model, why does it still take him 7 seconds to ready it?
or if someone knows a way to load a cached document instead of using the setDocument( ) method.
Thanks

Similar Messages

  • I am brand new to the Ipad.  I can't use ICloud unless I upgrade my 10.5 Leopard.  Is there a way to sync documents created in Pages to the IPad without using ICloud?

    Hello.  I am a newbie to the Ipad.  I am currently working with an OS 10.5 Leopard MAC.  I understand that in order to use ICloud I would need to purchase OSX Snow Leopard and OSX Lion.  I am attempting to avoid the expense and to the extent possible sync my IPad with my MAC.  I have created documents on my MAC in pages.  Is there a way to have access to those documents on the IPad without using ICloud.
    A second question concerns web browsing, sometimes you'll open up a page or image and not know how to go back to the previous page. So do I just close and reopen safari altogether or is there another way to get to the previous page.
    Thanks for any guidance you can provide.

    Actually you can use iCloud with the Mac running OS X 10.5.8. You don't sync the documents - you upload to or download them from iCloud.
    You can open a browser on your Mac - Safari is preferred - log into icloud.com, enter your username and password, click on the iWorks icon, click on the Pages section at the top - and then you can drag documents into the browser window to upload files - and you can select a file in the cloud to download to the Mac. I do this on my iMac at work running Tiger 10.4.11. It's kind of slow - and you will get a warning that you may be using a supported browser - but it works.
    In any event, you can use iOS file sharing to send the Pages docs to your iPad. you have to connect to the Mac and do this via iTunes.
    iWork for iOS: About iTunes File Sharing
    Just tap the arrows in the toolbar in Safari to go back and forth. You can open multiple pages using tabs. tap on the + sign to add another tab in Safari.

  • Is there any way to print document pages according to their master?

    I have a large document with multiple master pages in use. At different instances I often need to print only document pages that are "A" Master, "B" master, etc. Is there any way to do this, rather than entering the page numbers manually?

    Might be scriptable. Ask over in InDesign Scripting

  • Is there a way to approve documents sent to my printer before they print?

    I have a printer connected to my time capsule which is bridged to the wi-fi network at my house. I showed my roommates how to print to it, but they keep accidentally sending documents to my printer instead of theirs. Is there a way I could make it so that I would have to approve the documents before they are sent?

    No, the queue on the TC is not accessible AFAIK. You would need to share the printer from your computer so you have control over the queue.
    Make sure each of the users, has default printer set to local one, and only if they deliberately choose the TC connected printer can they print. In the end, you may simply find it easier for them to send you the print job.. ie cut off their access to the printer. They print to file and send it to your computer or a folder on the TC and you determine if you send the job to the printer. The exact method of doing that depends on the printer type.. usually easy for postscript file.. much hard for some others.

  • Performance problem...is there a way to cache query results?

    Greetings team,
    I've been deploying DS5.2 for a while now, and am on the cusp of pushing it into our production environment, however I've been noticing lately that some hosts are taking an exorbitantly long time to log in (actually, a user noted it, and I'm now investigating).
    Logins to hosts in this environment can take anywhere from 10-50 seconds. One thing that I've noticed is that any time you run a command that requires any amount of awareness of uid->username translation (i.e. if you ls -l /opt/home), queries are made to the configured directory server for this information. Is this normal? Since uid's and usernames don't often change (in most environments, anyway), is there a way this could be cached?
    I see also in my access log for my primary server (configured as a hub, btw) that there is near constant traffic to that host for LDAP info. I'm not sure why it's so chatty, but it does appear to be slowing things down a bit. The load on my LDAP host (a SunFire V210 w/ 1GHz processor, 1024MB RAM) seems to float between 1 and 12, with sar reporting an average idle time of about 44%.
    Any ideas? I'm really at a loss to explain why there's so much traffic to this host when much of it seems to come from hosts with nobody logged into them.
    Patrick

    It is great that you have found the root cause of
    your issue.
    nscd is by default started at boottime by a usual OS
    install. There is a /etc/nscd.conf but I doubt that
    anyone will change anything there as the default
    settings are good for most cases.
    I think LDAP search performance is affected by the
    existence of Search Indexes also.
    I have observed that if the user home directory is
    NFS mounted especially over a WAN, be it via
    /etc/fstab or automount maps, the login process will
    be very slow, it will take a while to obtain a
    command prompt at the home directory level.
    GaryGary et al,
    In my environment nscd has been explicitly disabled for some historical reasons, none of which are still a problem. So, I'm going to enable it for only passwd and group caching, with the default values for those caches.
    I'm in the process of working out my performance tuning plan for my LDAP servers, but I'm definitely going to have an eye on indices and caches. Those will probably have the least impact on search times and such for the moment since my directory is so tiny (261 entries!), but preventing that traffic from hitting the server at all will be a huge savings.
    I can definitely see why WAN mounted homedirs would cause things to lag. That's not the case here since NFS is a big no-no.
    Patrick

  • In Transaction CC04, Is there a way to print documents at once

    Hello Everyone,
    In Transaction CC04,  In Document Tab, when the Document Number, Document Type, Document Part are specified, t goes to the Product Structure Screem where there is a drill down for Sub ordinate documents.  Under the Subordinate documents There are many documents.
    Under each document, There are sub ordinate documents included with it. User needs a way to print all the documents at once  that have status as RL( Released). Is there a way to Print all documents with out drilling down in to each document and print. Please tell me a way to figure out this.
    Thank you

    You can. If it's one of the HP printers that support AirPrint then you can do so directly (this page lists the printers and has info on Airprint http://support.apple.com/kb/HT4356), there is the Epson iPrint app for some of their printers. Otherwise there are third-party print apps such as Print N Share, Print Central etc

  • Is there a way to recover documents removed from trash bin

    Is there a way to recover word documents etc that have been removed from the trash bin? They must still be on the hard drive somewhere. Thanks for any help!

    The problem is that your system no longer knows about the files - it has removed the pointer that tells it that those files exist, and where they start and end.
    However, it may be possible to recover the files using a utility like Data Rescue. The less you've used the computer since you emptied the trash, the higher the likelihood of recovery. And I don't just mean reading/writing user files, since the system is constantly using "available" hard drive space as storage (for temp and log files).
    Good luck!
    Matt

  • Is there any way to display document page numbers and section page numbers at the same time?

    Hi, I have different sections within my document starting the page numbering at 1. Besides the section page numbers I would also like to display the actual document page numbers in the header (eg. you are on page 10 of the document and page 4 of the section). Is there any way to do that? Thanks

    You can maybe use the Find/Change
    Command+i
    See if that can work for you.
    But like Steve said it is good practice to use Paragraph Style whenever you have lots of Type, I just get lazy sometimes.. lol
    Thanks

  • Is there a way to link documents together?

    Okay basically, I'm new to macs, and I am a uni student so when i'm doing notes etc I have to open up a pages document and usually a pdf file on preview. I was wondering if there was any way to somehow link these two documents together so that when I open one of them, the other one opens... I don't know if maybe i could add the pages file as a comment to the pdf or something. And I don't want to just merge the two files together so that the pdf is at the end of the notes, I still want 2 documents that are seperate but open automatically together... I know that sounds so lazy but I have sooo many different files I need that it takes me forever to find the corresponding ones!
    Hope you can help!
    Shannon x

    In the words of the Rolling Stones, "you can't always get what you want."
    So you have documents that have unfilled pages, each of which has an assigned page number that you synched through the book panel, but now you want the text in these documents to flow as one continuous thread? How do you think InDesign is going to be able to thread text in different files, and what do you expect to happen to your page numbering?

  • Is there any way to cache only specific sites?

    ''duplicate - locking - https://support.mozilla.com/en-US/questions/830618''
    I mean to cache only the sites i'm visiting frequently, e.g. my bookmarked sites.

    The simplest time-saving extension to keep you from accidentally visiting certain sites is at https://addons.mozilla.org/en-US/firefox/addon/4476

  • Is there a way to speed up Applications Listing?

    Every time I open Finder and click on Applications, it takes 20-30 seconds until it lets me scroll through the listing because it has to redraw the icons for every application. Is there a way to cache these icons so it doesn't stall every time? Note that once the icons are drawn, I can go to another area like Downloads, and then back to Applications and it's fine, but if I close the Finder window, or reboot, I have to wait again.
    -Z

    PrinceZordar wrote:
    I removed the .DS_Store file. Now to wait a bit to see if it helps.
    Thanks!
    Let us know if it helps. FWIW, I've noticed as well in Leopard that folders with large numbers of items, like Applications, definitely seem to take longer to become scrollable than they did in Tiger. In fact I have a Tiger and a Leopard machine in the same room and it's easy to see.
    One thing might contribute to this. Notice that even with "Calculate all Sizes" de-selected, Leopard does something that Tiger does not- it displays the size of all application Packages (Packages are basically glorified Folders). In fact, most of your apps are probably packages nowadays anyhow. Tiger didn't bother to display the sizes of those, but Leopard does.
    Dave

  • Is there any way of storing audio- / video-elements in the browser cache in Safari in iOS?

    Hi there,
    I'm desperatly trying to find a solution for a web application that has to run on an iOS-Safari (e.g. on iPad, iPad2 and iPhone 4):
    It's a web-application I wrote some time ago which lets the user search for and listen to short music samples (MP3s, all from ~100 kB to ~1.5 MB). The audio player is Flash-based, so it doesn't work on iOS-devices at the moment and I'll have to implement an alternative either in HTML 5 or with a "direct" QuickTime-object.
    Both my HTML 5- and QuickTime-alternatives for iOS-devices work fine so far, but there's one major problem I can't find a solution to:
    Unlike Flash and most HTML 5-capable browsers on Windows Safari on my iPad 2 won't store the audiofiles in the browsercache after loading and playing them - neither with HTML 5 audio-tags nor with a QuickTime-Object. Every time I load an audio file for playback from the server (with JavaScript-Commands, so without changing or reloading the whole page) it's downloaded again completely.
    If a user listens to sample A and then to sample B, Safari forgot about having played sample A and downloads the whole MP3 again if I like to listen to it again. On a mobile device with a potentially narrow bandwith this behaviour is out of the question.
    Is there a way of storing downloaded audiofiles opened by HTML 5 or QuickTime in Safari's cache so it remembers already having downloaded them  -  like it caches usual "web-files" like HTML, CSS or JPEG-images, or like Flash stores such objects in its local cache?
    The Application Cache with a manifest-file is not an option - this only seems to work if the browser is offline, for example if the iOS-device is in "Airplane"-Mode.

    Yes, I watched it. It contains interesting stuff I have to admit I didn't know yet, but unfortunately I still can't find a solution to my problem:
    My first attempt was trying to use the Application Cache with a manifest file - although this is not really the intended purpose for my application... I don't have a static set of files that I want to have cached or "available offline"  -  I just want to cache MP3s which the user has played yet.
    It should be possible to use a "dynamic manifest": One that is parsed by the Apache PHP module and listing the files played so far from a PHP session - something like this:
    <?php
    session_start();
    header("Content-Type: text/cache-manifest, charset=UTF-8");
    echo "CACHE MANIFEST\n";
    foreach($_SESSION['playedSongs'] as $song)
        echo $song."\n";
    ?>
    So whenever a song is loaded / played, I could access the PHP session with AJAX, insert the filename of the played file and manually update the manifest by calling window.applicationCache.update().
    There are two problems with this:
    First of all: It doesn't work. And I didn't even get to the point of trying to use a dynamic manifest:
    <!DOCTYPE html>   
    <html manifest="cache.manifest">
        <head>
            <title>Test</title>
            <script type="text/javascript">
            function playStuff(id)
                if(id == 1)
                    window.document.getElementById("audio").innerHTML = '<audio controls preload="automatic" autobuffer><source src="song01.mp3" type="audio/mp3" /></audio>';
                else if(id == 2)
                    window.document.getElementById("audio").innerHTML = '<audio controls preload="automatic" autobuffer><source src="song02.mp3" type="audio/mp3" /></audio>';
            </script>
        </head>
        <body>
            <div id="audio"></div><br />
            <br />
            <input type="button" value="playStuff(1)" onclick="playStuff(1)" />
            <input type="button" value="playStuff(2)" onclick="playStuff(2)" />
        </body>
    </html>
    The cache.manifest looks like this:
    CACHE MANIFEST
    song01.mp3
    song02.mp3
    and is properly returned from Apache as "text/cache-manifest" by adding
    AddType text/cache-manifest manifest
    to the .htaccess of this directory.
    The Apache-logs clearly show that the Safari (respectively "AppleCoreMedia") doesn't care about the application cache when it comes to audio-files:
    Safari itself seems to acknowledge the manifest and indeed preload the files:
    192.168.0.40 - - [23/Jul/2011:12:45:46 +0200] "GET /websql/index2.html HTTP/1.1" 200 2619 "-" "Mozilla/5.0 (iPad; U; CPU OS 4_3_3 like Mac OS X; de-de) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5"
    192.168.0.40 - - [23/Jul/2011:12:45:46 +0200] "GET /websql/cache.manifest HTTP/1.1" 200 79 "-" "Mozilla/5.0 (iPad; U; CPU OS 4_3_3 like Mac OS X; de-de) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5"
    192.168.0.40 - - [23/Jul/2011:12:45:46 +0200] "GET /websql/cache.manifest?%3E HTTP/1.1" 200 79 "-" "Mozilla/5.0 (iPad; U; CPU OS 4_3_3 like Mac OS X; de-de) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5"
    192.168.0.40 - - [23/Jul/2011:12:45:46 +0200] "GET /websql/song02.mp3 HTTP/1.1" 200 120525 "-" "Mozilla/5.0 (iPad; U; CPU OS 4_3_3 like Mac OS X; de-de) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5"
    192.168.0.40 - - [23/Jul/2011:12:45:46 +0200] "GET /websql/song01.mp3 HTTP/1.1" 200 120525 "-" "Mozilla/5.0 (iPad; U; CPU OS 4_3_3 like Mac OS X; de-de) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5"
    Up to this point I did nothing but opening my test-application in Safari.
    Playing song01.mp3:
    192.168.0.40 - - [23/Jul/2011:12:47:25 +0200] "GET /websql/song01.mp3 HTTP/1.1" 206 2 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:47:25 +0200] "GET /websql/song01.mp3 HTTP/1.1" 206 120525 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:47:25 +0200] "GET /websql/song01.mp3 HTTP/1.1" 206 120525 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:47:25 +0200] "GET /websql/song01.mp3 HTTP/1.1" 304 - "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:47:25 +0200] "GET /websql/song01.mp3 HTTP/1.1" 206 120525 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:47:29 +0200] "GET /websql/song01.mp3 HTTP/1.1" 304 - "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:47:29 +0200] "GET /websql/song01.mp3 HTTP/1.1" 206 120525 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    Playing song2.mp3:
    192.168.0.40 - - [23/Jul/2011:12:48:04 +0200] "GET /websql/song02.mp3 HTTP/1.1" 206 2 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:48:04 +0200] "GET /websql/song02.mp3 HTTP/1.1" 206 120525 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:48:04 +0200] "GET /websql/song02.mp3 HTTP/1.1" 206 120525 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:48:04 +0200] "GET /websql/song02.mp3 HTTP/1.1" 304 - "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:48:04 +0200] "GET /websql/song02.mp3 HTTP/1.1" 206 120525 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:48:05 +0200] "GET /websql/song02.mp3 HTTP/1.1" 304 - "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:48:05 +0200] "GET /websql/song02.mp3 HTTP/1.1" 206 120525 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    Playing song1.mp3 again:
    192.168.0.40 - - [23/Jul/2011:12:48:38 +0200] "GET /websql/song01.mp3 HTTP/1.1" 304 - "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:48:38 +0200] "GET /websql/song01.mp3 HTTP/1.1" 206 120525 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:48:38 +0200] "GET /websql/song01.mp3 HTTP/1.1" 206 120525 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:48:38 +0200] "GET /websql/song01.mp3 HTTP/1.1" 304 - "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:48:38 +0200] "GET /websql/song01.mp3 HTTP/1.1" 206 120525 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:48:40 +0200] "GET /websql/song01.mp3 HTTP/1.1" 304 - "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:48:40 +0200] "GET /websql/song01.mp3 HTTP/1.1" 206 120525 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    Playing song2.mp3 again:
    192.168.0.40 - - [23/Jul/2011:12:49:12 +0200] "GET /websql/song02.mp3 HTTP/1.1" 304 - "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:49:12 +0200] "GET /websql/song02.mp3 HTTP/1.1" 206 120525 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:49:12 +0200] "GET /websql/song02.mp3 HTTP/1.1" 206 120525 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:49:12 +0200] "GET /websql/song02.mp3 HTTP/1.1" 304 - "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:49:12 +0200] "GET /websql/song02.mp3 HTTP/1.1" 206 120525 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:49:13 +0200] "GET /websql/song02.mp3 HTTP/1.1" 304 - "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    192.168.0.40 - - [23/Jul/2011:12:49:13 +0200] "GET /websql/song02.mp3 HTTP/1.1" 206 120525 "-" "AppleCoreMedia/1.0.0.8J2 (iPad; U; CPU OS 4_3_3 like Mac OS X; de_de)"
    Every file is downloaded again completely when playing it. So "AppleCoreMedia" (whatever this may be exactly, the QuickTime-plugin that is triggered by the HTML 5 audio-element I suppose?) either doesn't have access to the Application Cache or simply just doesn't realize the files in it. So if I switch my iPad to "Airplane Mode" now, the Safari is unable to access / load / play the files.
    I also tried using a QuickTime-object instead of an HTML 5 audio-tag (as far as I know HTML 5 audio and video in Safari always use QuickTime?) and controlling it with something like:
    document.movie1.SetURL('song02.mp3');
    Nothing changes, it's just like using HTML 5 audio and everything gets downloaded again when loading/playing it.
    And even if this would work there'd still be a problem:
    To properly implement that I would have to load the MP3-file in the Application Cache before playing it. When doing this it seems impossible to show a "real" progress: The ProgressEvent that is fired from the Application Cache after updating it doesn't seem to provide any information about data loaded so far and the complete size of a file. It's just "File 1 from 2" and so on, and not a "real" progress where I could determine something like: "100 kB of 1.2 MB loaded" as I can with the audio-element.
    All the other storage-approaches like Web SQL / Web Database or Local Storage are no help either:
    I don't see any way of getting the MP3 data into Local Storage or Web Database or getting it out again to play it. The HTML 5 Canvas-element has a toDataURL()-function to produce a Base64-encoded representation and use it for storage  -  the Audio-element doesn't seem to have anything like this.
    My last really "dirty" approach was trying to load "manually" Base64-encoded-MP3s with a combination of AJAX and PHP: A PHP-script outputs a Base64-representation of a MP3-file and is loaded by AJAX, so I could store the Base64-representation e.g. as Local Storage or in Web Database:
    <?php
    $infile = 'song01.mp3';
    $contents = file_get_contents($infile);
    $base64 = base64_encode($contents);
    $audio = 'data:audio/mp3;base64,'.$base64.'';
    echo $audio;
    ?>
    I tried using the resulting AJAX responseText as the source-argument in an audio-source-tag. Suprise: It doesn't work in Safari on my iPad 2, the player just fails to load the "file", although this works fine in Chrome on Windows. Possibly a size limitation for Base64-URIs on Safari / iOS.
    And again: Even if this was working in iOS/Safari I don't know of a way to determine a real progress from an AJAX-query...
    The last thing I could think of is not replacing the audio- or source-tags when loading a song but leaving them in the DOM-structure, check if it's already there when a song is loaded and just add a new audio-tag if a song hasn't been loaded yet.
    This solution would be my last resort: I'd have to rewrite nearly the whole application to completely operate on JavaScript / AJAX to stay on one site in the browser - else the "cached" audio data would be lost again when changing to another site in Safari.
    Furthermore I think there'll be a small cache limit somewhere when doing this?
    Any ideas?

  • Is there a way to create hyplinks in documents automatically with firefox, as you can with IE?

    Is there a way to create hyperlinks "automatically with Firefox, as you can with IE (with, for example, Ctrl + K, then go to the website, then back to the document, and it automatically populates the url)?

    If you create the folders as a child within the main pictures folder, then they will show up in the app separately. I have many folders with pictures in.
    You will need to move the photos manually - they will automatically go in the Camera folder.
    Hope that helps.
    Love Me - Love My BlackBerry
    Z10 OS Version: 10.0.10.690
    Z10 Software Release: 10.10.90
    PlayBook - 2.1.0.1526

  • My Pages document will no longer show up on my iPad. It shows up on iCloud and i tried to download the document on to my computer. It only gives me an error and tells me to try again. Is there some way I could recover my document?

    The other day I tried to open a document on my Pages app on my iPad. I soon notice I could no longer see it anywhere is my documents. I opened my laptop and went to iCloud.com to search for it there. On iCloud.com I am able to see the document but I can not do anything with it. I tried downloading it to my computer as a pdf. file but it just says error and to try again. I was able to copy the document but it does not allow me to download the copied document either. Is there some way I can recover the document or a pervious version of the document?

    How are you seeing your document on iCloud from your laptop? Web browser, or OS X Pages open dialog?
    If you have MS Word or .pages formatted files parked on iCloud, the web interface will not permit their download as PDF, and in fact, PDF is an inactive option in that download menu for these word processing files. There is no copy facility available, but duplicate functionality exists from the iWork category within the iCloud web presence.
    If you have Pages v4.2 or later installed on your (assumption: Mac) laptop, launch Pages and in the open file dialog, select iCloud on the dialog toolbar. Now, press and hold the option key as you drag and drop a copy of our document from iCloud to your desktop. The reverse works also.
    See if you can open that document on your laptop now.

  • When I attempt to open a PDF file I saved from a website, I get the message "There was an error opening this document. The file is damaged and could not be repaired." Is there any way to correct this problem?

    When I attempt to open a PDF file I saved from a website using Safari, I get the message "There was an error opening this document. The file is damaged and could not be repaired." When I save the same PDF file using FireFox it opens up immediately. Is there any way to correct this problem with Safari?

    Back up all data.
    Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

Maybe you are looking for

  • Trouble Reinstalling Photoshop CS on Windows XP

    I recently installed Macromedia Dreamweaver 4  and firework 4 (Trial Version) and after few days I deleted both the program. But now my Adobe Photoshop CS that I had working before is not working. I deleted the program as I do have an original CD and

  • AHH! Help! colors (not b&W) are negative - blue to orange etc..

    All colors (not black and white) are inverted. the ol' universal access trick / control/opt/cmd/8 trick doesn't work! tried recalibrating colors to no avail.

  • Replication in oracle 10g

    hi, please anyone tell about the schema level and table replications in oracle 10g.

  • BI CMOD Performance

    Dear Friends, I have a performance related question. We need to develop a report in which Sum of top 5 materials based on delivery quantity has to be displayed monthwise. Eg: If in January Materials M1 M2 M5 M6 M7 are top 5 in delivery quantity, then

  • Touch got wet,water bottle leaked.it's in some dried rice..what to do now?

    I had my touch with me in my backpack, my water bottle must have leaked, and so the ipod must have been in contact with water for about 8 hours, as I was going through my day. It looked like just the screen had gotten wet so I tried to turn it on...b