Include ETag inside html – idea

Browser caching is a deep topic, but I had an idea today. 

One tradeoff used in browser-side caching is whether to use an expiration header or a etag header to control the browser cache. 

Expiration headers can tell the browser “keep this file until this this date/time, and then you can retrieve it again”. 

Etags send a custom hash or number to the browser and basically say “check with the server if the file is still this version, send the new one back if not”. 

The etag header allows updating files almost immediately in the browser, since the browser still sends a request everty time to chec if the file has changed. 

Expiration headers don’t have this fast turnaround- if you set the date way in the future, you won’t have a way to tell the browser “hey, this file changed, please re-download it!”. 

So my idea is this: why not combine the benefits of the two, and include the etag value for linked files within the tags in the html? 

For instance, when I retrieve index.html, and it include a logo.png file, we could make the tag look like this: 

<img src=”/logo.png” etag=”5E451FFA498″ />

Then the browser can check this etag against the version already in the local cache, and does not need to make a request to the server for each file to re-check the etag on the files. 

Blocking Ad Blockers – Unblockable Ads

Can web ads be “unblockable”?

Lots of web users are running Adblock Pro and a variety of other tools that do a very effective job of blocking ads on websites. Most of these tools simply block access to the third party urls that serve up the majority of the ads on the web. Products like Google Adsense are rendered useless with these tools.

I never gave it much thought until I read an article about a popular gaming news website that did a test and found out that a huge chunk of their users (about half if I recall) were running these adblockers. Since these sites make their income from ad clicks, these blockers are effectively “stealing” revenue from the site.

Of course the percentage of users blocking ads will vary by website because of the difference in demographics of the visitors. The rule of thumb is: the nerdier the audience, the more likely they’ll be nerdy enough to know about and run ad blockers. For a gaming news site, this results in huge numbers. I’ve proven this by running tests on two sites that are completedly different audiences, one being a nerdy audience and the other not at all… and sure enough, the nerdy one is nearly 25% blocked. The other, under 1%.

I’ve derived these stats by running a service called BlockMetrics.com, which measures the ad blocking and gives you the option to pop up a “please don’t block us!” appeal to the visitor. This can be partially effective, but sites have to be careful to not p-off their visitors in the process.

So this got me thinkin- why not employ a method of showing unblockable ads? Shouldn’t be too difficult: Just route the ad requests through a proxy on your same server, so that the ads are then served from your same url and commonly known ad serving urls cannot be blocked (or not as easily). Throw in some obfuscation in the html to prevent blockers from learning which parts of the html contain ads.

This might be a viable option for larger sites that can both justify the additional expense while also proving trustworthy to the ad providers, but most common sites won’t get Google to approve running Adsense in this fashion. So a hybrid approach seems viable here: The page detects adsense or other ads being blocked, and instead loads same-site sourced “second tier” ads to be loaded in their place. This lets the site maintain the high payouts for google ads, but can still get at least some second tier ones to show for those running blockers.

Sounds like a great business plan: and Unblockable Ads service.

Source code more like markup

I feel like I’ve written about this before, but can’t seem to find it, so here goes.

Most source code today is basically still just a text file. Historically this has been good because it it makes things easy to edit, platform independent, etc. There has been some level of progress in making source contain more… shall we say, meta data, than in the past – for instance, the code commenting that visual studio allows is effectively xml that is commented out in the source.

But, it’s friggin 2012 now, and every document in digital form has some level of markup along with some form of viewer, so that more.. i hate to use the word “rich”, but it applies here… rich information can be presented. For example: MS word allows doing all kinds of crazy things with your documents, way beyond what the original concept of word processing envisioned. And of course a better example to use is HTML. A better example, because it is open (the source is always easily visible if needed), and uses open standards so that anyone who so desires can build a viewer (browser) to enable viewing the html code in a more human friendly form.

So: what if my c# source code document were actually an html document, instead of just pure text. What would this allow me to do? Imagine how helpful some of these things might be for developing with a team-

-Highlight a section of code to draw attention to it.

-Add a comment to a portion of code that you hover over to see.

-Or, click to go directly to a discussion about the code in your team/respository server

-OR, add an anchor to the code that you reference in a bug, so clicking the link inside the bug report will take your directly to that line in the code.

-Unique formatting, as simple as changing font sizes and colors, or even align certain portions of code in multiple columns in the same source file

-Enable tracking the edit history of the file, inside the same file (not sure if this makes sense or not)

-Create your own collection of bookmarks and/or todo notes directly in the code where they are needed, associated with your username so you can filter out and see just the ones your wish to see.

-Sticky Notes… right?

The way I envision this happening is using something very close to html (if not actually html), which can contain all kinds of extra markup but the end result of the document is to render some text… but in this case, instead of the text being meant for the human to read, it will be the actual source “output” of the document that is meant for the comiler to handle. The rest of the markup is there to support the developer and the team by adding human-friendly visualization, interactivity, and functionality.

Business Ideas list (from ycombinator)

This list has been around a while, but a good number of items still stand true. Some of the things I’d still like to see done correctly are

 

-item #21- displace intuit quickbooks. They charge too much, and are lazy because they don’t have competition. Oh and I hate using their bloated software. How tough could it be to build a simple small business accounting system?

 

-item #22 – build a hybrid between excel and access. I’ve thought this for a long time, there needs to be a newer version of access for large sets of data (no 2gb limit), and a simple set of tools for throwing a UI on top of a database. Integrate that all into a portable, standardized file, like the old MDE’s were. Then also make it useful like excel, with formulas and such. This list specifically mentions making it browser based, but I’d actually like to see it do both – a desktop enabled data file that can then be run online as well. Being a .Net guy, I’d love to see some built-in scripting capabilities that utilize .Net, but that’s probably the wrong choice for portability reasons (unless we stay a Windows based tool.. which access and excel already are, so….)

 

see http://ycombinator.com/ideas.html

 

Of course I have a few I’d add to that list as well. Unlike ycombinator, I’m not secure enough to go blab them here. but let’s try a couple for fun

 

-A global online reputation system – why prove your worthiness on every platform you use. Example: my stack overflow rating is over 1000, not awesome but pretty good. but when I log into a new forum, i’m a nothing. What if each of these sites/services were to be able to aware categories reputation points that you could take with you other places. Include fun things like badges etc.

-A similar type of rep system, but utilized in customer support scenarios. When I call my internet provider, they could route my support call based on a rating that shows I’m a guru in networking, and neither I nor they need to waste time telling me how to reboot a router. They save money on eliminating uncessary support, and the customer may even survive the experience without suffering extreme infuriation.