cache - Dave's Blog

Search
My timeline on Mastodon

Tweet from David_Risney

2016 Jan 7, 9:31
Firefox to remove appcache offline support. https://www.fxsitecompat.com/en-US/docs/2016/application-cache-support-will-be-removed/ … https://twitter.com/FxSiteCompat/status/685332720281645056 …
PermalinkComments

Words with Hints Windows 8 App Development Notes

2013 Jul 4, 1:00

My second completed app for the Windows Store was Words with Hints a companion to Words with Friends or other Scrabble like games that gives you *ahem* hints. You provide your tiles and optionally letters placed in a line on the board and Words with Hints gives you word options.

I wrote this the first time by building a regular expression to check against my dictionary of words which made for a slow app on the Surface. In subsequent release of the app I now spawn four web workers (one for each of the Surface's cores) each with its own fourth of my dictionary. Each fourth of the dictionary is a trie which makes it easy for me to discard whole chunks of possible combinations of Scrabble letters as I walk the tree of possibilities.

The dictionaries are large and takes a noticeable amount of time to load on the Surface. The best performing mechanism I found to load them is as JavaScript source files that simply define their portion of the dictionary on the global object and synchronously (only on the worker so not blocking the UI thread). Putting them into .js files means they take advantage of bytecode caching making them load faster. However because the data is mostly strings and not code there is a dramatic size increase when the app is installed. The total size of the four dictionary .js files is about 44Mb. The bytecode cache for the dictionary files is about double that 88Mb meaning the dictionary plus the bytecode cache is 132Mb.

To handle the bother of postMessage communication and web workers this was the first app in which I used my promise MessagePort project which I'll discuss more in the future.

This is the first app in which I used the Microsoft Ad SDK. It was difficult to find the install for the SDK and difficult to use their website, but once setup, the Ad SDK was easy to import into VS and easy to use in my app.

PermalinkCommentsdevelopment technical windows windows-store words-with-hints

Cache them if you can

2012 Mar 23, 1:19

New stats on HTTP caching on the web.

PermalinkCommentstechnical http cache statistics

manifestR - offline web apps made easy (well easier)

2011 Jul 14, 7:34A bookmarklet to help you create an appcache manifest: "...click the manifestR button, and it will create an HTML5 appcache manifest file for that page."PermalinkCommentsdevelopment javascript tools html5 cache technical

DVD Ripping and Viewing in Windows Media Center

2010 Aug 17, 3:05

I've just got a new media center PC connected directly to my television with lots of HD space and so I'm ripping a bunch of my DVDs to the PC so I don't have to fuss with the physical media. I'm ripping with DVD Rip, viewing the results in Windows 7's Windows Media Center after turning on the WMC DVD Library, and using a powershell script I wrote to copy over cover art and metadata.

My powershell script follows. To use it you must do the following:

  1. Run Windows Media Center with the DVD in the drive and view the disc's metadata info.
  2. Rip each DVD to its own subdirectory of a common directory.
  3. The name of the subdirectory to which the DVD is ripped must have the same name as the DVD name in the metadata. An exception to this are characters that aren't allowed in Windows paths (e.g. <, >, ?, *, etc)
  4. Run the script and pass the path to the common directory containing the DVD rips as the first parameter.
Running WMC and viewing the DVD's metadata forces WMC to copy the metadata off the Internet and cache it locally. After playing with Fiddler and reading this blog post on WMC metadata I made the following script that copies metadata and cover art from the WMC cache to the corresponding DVD rip directory.

Download copydvdinfo.ps1

PermalinkCommentspowershell wmc technical tv dvd windows-media-center

Caching Improvements in Internet Explorer 9 - IEBlog - Site Home - MSDN Blogs

2010 Jul 14, 3:32PermalinkCommentseric-lawrence http cache performance web browser ie ie9 technical

High Performance Web Sites :: Call to improve browser caching

2010 Apr 29, 11:59"Over Christmas break I wrote Santa my browser wishlist. There was one item I neglected to ask for: improvements to the browser disk cache." If only it were so simple as to just increase the max size of your HTTP cache...PermalinkCommentsperformance http web browser cache technical

Database - WEBAPPS

2010 Mar 5, 10:21Document explaining the relationship between the various web storage APIs coming out of HTML 5. To summarize:
Web Storage (aka DOM Storage) - simple key/value pairs API.
WebSimple DB API - now called Indexed Database API.
Indexed Database API and Web SQL Database - competing database APIs.
Application Cache - Storage of HTTP resources for offline apps.
DataCache API - A programmatically modifiable Application Cache.PermalinkCommentshtml html5 standard programming technical wiki w3c database storage web

Safari Dev Center: Safari Client-Side Storage and Offline Applications Programming Guide: HTML 5 Offline Application Cache

2010 Jan 26, 1:47Details on Safari and iPhone's HTML5 offline app cache.PermalinkCommentshtml web technical html5 cache safari iphone

WPAD Server Fiddler Extension

2010 Jan 5, 7:42

I've made a WPAD server Fiddler extension and in a fit of creativity I've named it: WPAD Server Fiddler Extension.

Of course you know about Fiddler, Eric's awesome HTTP debugger tool, the HTTP proxy that lets you inspect, visualize and modify the HTTP traffic that flows through it. And on the subject you've probably definitely heard of WPAD, the Web Proxy Auto Discovery protocol that allows web browsers like IE to use DHCP or DNS to automatically discover HTTP proxies on their network. While working on a particularly nasty WPAD bug towards the end of IE8 I really wished I had a way to see the WPAD requests and responses and modify PAC responses in Fiddler. Well the wishes of me of the past are now fulfilled by present day me as this Fiddler extension will respond to WPAD DHCP requests telling those clients (by default) that Fiddler is their proxy.

When I started working on this project I didn't really understand how DHCP worked especially with respect to WPAD. I won't bore you with my misconceptions: it works by having your one DHCP server on your network respond to regular DHCP requests as well as WPAD DHCP requests. And Windows I've found runs a DHCP client service (you can start/stop it via Start|Run|'services.msc', scroll to DHCP Client or via the command line with "net start/stop 'DHCP Client'") that caches DHCP server responses making it just slightly more difficult to test and debug my extension. If a Windows app uses the DHCP client APIs to ask for the WPAD option, this service will send out a DHCP request and take the first DHCP server response it gets. That means that if you're on a network with a DHCP server, my extension will be racing to respond to the client. If the DHCP server wins then the client ignores the WPAD response from my extension.

Various documents and tools I found useful while working on this:

PermalinkCommentsproxy fiddler http technical debug wpad pac tool dhcp

Get cached images from your visitors | Diovo

2009 Dec 15, 2:01"Jeff Atwood (Coding Horror fame) was in for a horror when he realized that his server crashed and his data was gone and due to some reason, the backup mechanism was not working. ... So what should Jeff do now? Since Coding horror is a high traffic blog, I think there is a way to get back at least some of the images." Reconstruct the HTML from Google's cache, change the HTTP server to tell the client it has the correct cached image for all the images, add script to the HTML to grab the images and send them back. Awesome idea. Of course now I want to setup Fiddler to swap in random images...PermalinkCommentsvia:ericlaw jeff-atwood backup web http cache image javascript technical

Metalink/HTTP: Mirrors and Checksums in HTTP Headers

2009 Nov 24, 5:51"Metalink/HTTP describes multiple download locations (mirrors), Peer-to-Peer, checksums, digital signatures, and other information using existing standards for HTTP headers. Clients can transparently use this information to make file transfers more robust and reliable."PermalinkCommentshttp metalink url p2p http-header cache redirect reference technical

Making browsers faster: Resource Packages · Alexander Limi

2009 Nov 17, 6:52"What if there was a backwards compatible way to transfer all of the resources that are used on every single page in your site — CSS, JS, images, anything else — in a single HTTP request at the start of the first visit to the page? This is what Resource Package support in browsers will let you do." Another resource packaging implementation but this suggests they'll actually implement this in FireFox. One issue with all of these is you can't use the resources from the package in any context that didn't ask to use the package for fear of security issues which means you can't stick the packaged resources in your HTTP cache. The package itself could go in the cache which would mean multiple packages per page or all your page's resources in one package. Of course the same security issues are a concern for all of the packaging proposals if a site has any way to inject into the source the request for the package. It'd be a similar vector to the UTF7 XSS issues but much worse attack.PermalinkCommentssecurity web browser http zip firefox resource technical via:kris.kowal

Recap Firefox Extension | "turning PACER around"

2009 Aug 14, 3:55The government program PACER is an online archive of court records and even though the documents are public domain, PACER charges access to them ostensibly to pay for PACER. This plugin uses the Internet Archive as a kind of free intermediate cache, rewriting the PACER HTML to reference the free Internet Archive versions of the documents when available and uploading PACER documents to the IA cache when you download one it doesn't yet have.PermalinkCommentsvia:waxy firefox government politics research reference legal law plugin technical

Insite | Google’s advanced operators for journalists

2009 Jul 24, 5:29Contains a few operators I hadn't seen, like '~[word]' for results that contains the synonym of the word, '*' for wildcards within quoted phrases, and 'info:[URL]' for their cache results, links to and from the page, etc.PermalinkCommentsvia:sambrook google search operators technical

STGC Enumeration (Windows)

2008 Oct 1, 1:49One of the values in this enum is named 'STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE'. After reading (and re-reading to make sure I word broke correctly) I'm left with the lingering impression that I've had an extensive conversation with whoever named this variable. Anyway, I thought it was a fun name.PermalinkCommentshumor software msdn microsoft reference

Refreshed Internet Drafts - Implementer's notes - by Yngve Nysaeter Pettersen

2008 Jun 30, 3:49Yngve Nysaeter Pettersen briefly talks about his Opera minimal security domain RFCs: "I've just refreshed my HTTP Cookie and Cache related Internet Drafts."PermalinkCommentsrfc opera browser cookie http internet domain dns

Hixie's Natural Log: A low-bandwidth, high-latency, high-cost, and unreliable data channel (Cached)

2007 Oct 16, 12:22FTA: "Look at all those zero cents... there are data bits there, lying unused! It struck me that with every single restaurant transaction I could set the cents field to some number under my control, thus allowing me to communicate with myself at a lPermalinkCommentsblog humor hack food article encoding restaurant via:ericlaw

roachfiend.com - ErrorZilla - Useful error pages for Firefox

2007 Aug 21, 10:22Replace FireFox's error pages with some useful options like check archive.org or coral cache.PermalinkCommentserror mozilla firefox reference extension cache archive whois

ErrorZilla err ErrorSoft

2007 Aug 21, 4:04Seeing ErrorZilla I realized I could easily do a similar thing to the IE7 404 page using the same technique I used for the XML view and the feed view.

So that's what I did: I made a new 404 page for IE7. There's not much new here technically if you've read the previous blog entries to which I linked. My 404 page change adds links to the Internet Archive, the Coral Cache, and Whois Tool.PermalinkCommentsarchive personal res cache resource ie7 technical browser whois 404 error extension
Older Entries Creative Commons License Some rights reserved.