Aleksandar • Vacić

iOS bits and pieces

Insert HTML page into another HTML page

…or what to use instead of iframe in XHTML Strict pages.

I have added some ads the other night, to the archive pages related to traveling. These ads are actually full-featured search snippets that allows you to directly search database. Very handy things.

Sadly, they are written the old-fashion way, with quirks mode in mind, and worse yet - they are writing nested table tag soup directly into the page - no iframe thingie, like Google AdSense is doing. Thus, when my CSS files got applied to it, the snippet fell apart.

Luckily, the snippet always opens a new window, thus I quickly coded in an iframe in which the snippet is displayed. Which was all dandy…apart from the fact that my pages are XHTML 1.0 Strict, in which iframe is banned element. Jolly.

Correct way to include another HTML page into another is by object. The element which only purpose is to insert any foreign object into nice and structured web page.

Google Analytics

Hot on the hills of AWStats, I have added Google Analytics tracking code to each page on this site. With small hiccup - I added it to blog pages only, by mistake. Realized four days later. Dumb

Although Dejan told me all the good stuff about it, I did not bother to try it out until few days ago. Server-side log analysis is still needed since my feeds can’t be tracked with GA code. For other pages though, the amount of tracking options GA gives is amazing. There are some very interesting things I picked up there.

Geo-map overlay

One of the best visual goodies is this geo-map overlay display. It’s one thing to look at the list of countries from where people are coming, quite another to see it so nicely displayed. I actually hovered over each of those dots to take a look and smiled all the way.

AWStats log analysis

DreamHost, where all my sites are located, offer Analog log analyzer as your window into visits demography. Analog is not bad, but it has horrible user interface and it seems it is not developed anymore.

A much better alternative is AWStats, which is not only free, but actively developed too. I have installed the 6.5, latest stable version and for now only have the last 24h data. Interesting stuff, nonetheless :)

Relaxed dead centre layout

This post is more of a reminder for me than anything new, as I need this splash thing from time to time and never can remember where I keep it.

95% of code is from Dušan Janovský. I merely simplified it, thus instead of 3 or 4 nested divs, you need just one div, for the actual content. html and body play the role of table and table-cell respectivelly. Pure semantics. :)

For IE6 and IE7, I opted for the expression property, masked under conditional comments. No other solution I encountered is flexible enough.

This solution has 100% of the available height to spread, because there is no fixed height set for the content div.