Best way to download 600 fonts onto user's browser - ajax

In my mini web application, I wonder whats the best way of serving the 600+ fonts from google web fonts library to my users, primary concerns are the font file sizes, ajax calls delay.
Two possible options that come to mind are:
Ajax calls to download the font when the user scrolls through the dropdown list of those 600 fonts.
Create & store images of fonts on server, only retrieve those images when the user scrolls down the drop down list, subsequently, when the user clicks on a particular image, only then does the font file download locally.
Edit: To put the question more clearly forward, I am wondering whats the best option I have of serving 600+ fonts to a user of my font web app?
Thanks

Related

Save image after it gets loaded without the right click menu

I was just watching some street view images in this website where if you refresh everytime it loads up a new image. Then I realized a image was too beautiful and I was trying to save that image somehow, and it is when I came to know that I can't right click and same street view (Panorama) images. I thought maybe going to developer tools then network might help but it requires to be opened before I load up the page or I have to refresh the page which is disasters in this case.
I know the images loads up on browsers gets saved in the data folder of the browser. But I don't know how to retrieve them or is there any other ways I can save the image?

How do I prevent images from being my top visited content?

I recently noticed that some of the images on my website are the pages with the most visits according to Google Analytics. The pages could be accessed by clicking them. The result was the pages being opened in a separate tab. I now deactivated this so now one has to right-click and say "open image in new tab" to get the same results as before. Still I'd like to know how this happens? I don't find the images anywhere on top ranked image searches. Also I would like to use this traffic for "real" purposes, instead of linking to images.

App Inventor 2 - WebViewer detecting changes

I am trying to integrate MobPartner ads in my app, the ads from MobPartner can be displayed from "Pools" which contain several ads which automaticly scroll sideways and are set which an individual click link. The page with the ads looks like this, when I set the URL of the WebViewer in AI2, the ads display and scroll as they should.
The problem I have is detecting a click on one of the ads, this is the best I got to:
If a user would click on one of the ads via the WebViewer it will redirect them to the automatic URL set by the advertiser. I will then use the link and set ActivityStarter to WebViewer1.CurrentUrl and start the website full screen instead of the ad resolution (320x48).
I would like to know if there is a way to detect any clicks within WebViewer so that I can start ActivityStarter faster with the link. If not, is there a way to check the URL of the link clicked in WebViewer before the target website loads. In my opinion the timer (set to 1000 interval) is an inefficient way of checking if an ad is clicked. Anyone able to answer my questions above or provide a way of improving this code? Much appreciated.
PS: The HomeUrl for WebViewer has been pre-defined in the designer as well as the ActivityStarter "Action".
Thank you!
There is no possibility to detect any clicks within the Webviewer. The only thing you can detect is an URL change with the Clock component, and this is what you are already doing.
What you could do is to reduce the timer interval or instead of opening the webpage with the Activity Starter, just stay in the Webviewer and set its height and width to fill parent, which is -2 in the Blocks Editor, and hide all the other components on the screen to be able to view only that webpage in full screen.

How to handle downloads in mobile site

How does one handle image downloads in a mobi site - using jquery mobile and asp.net mvc 3 and have a requirement to allow a user to download wallpapers to their mobile.
Can you trigger a download or is best to simply simple the image to them and let them handle the saving?
Any input appreciated.
Typically, you can force the download of content on standard browsers by setting headers
"Content-Disposition", "attachment; filename=\"LicenseAgreement.pdf\""
on the return. This SO shows how to return a PDF file but theoretically, you could do the same with an image.
How can I present a file for download from an MVC controller?
However, it is questionable if every browser that is supported by jquery mobile would even respect that and give any kind of a save prompt or just open the image in a new window. Give it a shot but test it on iOS, Android, WinPhone 7.5+, and (gagging) Blackberry 6+ and see what happens because they're probably going to all behave a little differently.
Were it me, I'd simply link directly to the image either on the current page or with a target="_blank" and let them save it however they usually save images.

firefox addon, transparent floating panel

I'm developing a firefox addon and would like to have a fixed position (relative to the browser) semitransparent panel with 3 icons shown at the corner of every browser content area. These buttons will have to be able to communicate with a site that is not the site shown.
I know it would be possible to inject a fixed position div to html but I want the buttons to communicate with external site when pressed and also query information when they are loaded so I think that would violate same origin policy. This wouldn't work with image or other direct media urls either.
What would be the easiest way to create the floating icon panel?
After about of week of work I found it. Here is the answer, I hope this helps someone else:
http://marcada.ms/2010/02/getting-content-on-top-of-the-browser-space-using-xul/
The above adds the panel, transparency is not working (at least not in linux what I work with) because of the following bug. Sigh... opened in 2007 and not closed in 2012.
https://bugzilla.mozilla.org/show_bug.cgi?id=408284
edit2: I ended inserting html data to the body of the document using files from extension folder. Works very well including transparency.
edit3: If anyone is interested how this works in my plugin, check my live site at http://www.upmarker.com

Resources