Archive for the ‘web’ Category

Need help with Apache, MultiViews, PHP, and the Content-Type header

Sunday, April 16th, 2006

I’m finally getting into PHP, and have it set up on my computer, but I’m having a problem with Content-Type. Without PHP, if I do, say,

AddType application/xhtml+xml pxhtml
AddType text/html phtml

I’ll get .phtml files served as html and .pxhtml files served as xml. But when I tell it to route them through PHP (with AddHandler php5-script phtml pxhtml), PHP undoes that and rewrites it with its own, always as text/html.

I found the default_mimetype setting in php.ini, but it’s not helping. If I set it to something, all files are served that way, so I can’t distinguish between html and xhtml. If I don’t set it at all, it falls back to the default of text/html. And if I set it to the empty string, it still sets everything to text/html, probably meaning it’s just falling back on the default.

So how can I make it respect MultiViews’ setting?

Trust paths through OpenID

Thursday, April 13th, 2006

Okay. So you know how OpenID is an actually viable identification system? And you know how PGP/GnuPG have a concept of signing other people’s keys to establish trust paths?

Well, I was just thinking about blog comments, and a) how now that I have them re-enabled, I’m getting spam, and b) I’d like to enable OpenID, and I got an idea (which, if you read the first paragraph, you’ve probably already figured out). Why not extend OpenID to also allow trust paths? Basically, if I trust Anne to be a real person and not a spammer, and he trusts Ian, I can be pretty sure that Ian’s not a spammer. And if Ian’s server is compromised and a spammer starts sending stuff as him, or if he’s paid off by the Evil Spam Operators to “trust” them, then I can either blacklist Anne, blacklist Ian, nofollow Anne (so I trust him but don’t trust his contacts), or even just wait for Anne to take care of it.

Obviously it could be fleshed out a bit more (max depth for trust paths?) and in implementations too (temporary blacklist: blacklist Anne for 24 hours and renew automatically if I got any comments through his trust path that looked like spam, else re-trust), but it looks like a start.

Thoughts?

Making Apache work

Thursday, April 13th, 2006

Note to future self:the reason your Apache configuration isn’t working is that Gentoo has stupid defaults and puts up extra walls in the name of “security”. You need to edit /etc/apache2/vhosts.d/00_default_vhost.conf and switch the AllowOverride None to All.

Blog upgraded, comments now work

Wednesday, April 12th, 2006

I needed to fix comments here, so I had a few choices. a) Figure out what was wrong, or b) just upgrade and let that fix it.

I upgraded. That fixed it.

As a downside, I no longer have the comment validation plugin. Someone should write a plugin that parses all input as HTML 5 and re-serializes it as valid whatever-language-you’re-using.

Edit: And let the blogspam begin! I’m holding all comments for moderation now. I think you can get around that by registering an account here or something (?) but I basically don’t care yet. Maybe I’ll look into it once I actually understand enough PHP to make changes.

If Content-Type is dead… now what?

Tuesday, April 11th, 2006

Okay, so Content-Type is dead. But in a perfect universe, what would there be? Should we try to revive it? Should we let filenames matter? Should we rely on content type sniffing? Should we try to standardize a metadata wrapper for files? Nothing looks appetizing here, but Content-Type is the least bad.

Tuesday, April 11th, 2006

Oh. I guess the reason no one’s left a comment on my blog in ages is that there isn’t a comments form.

I should fix that… today, probably. Right now I’m tired.

Yay! Cairo on Linux!

Wednesday, April 5th, 2006

Yay! Cairo on Linux!

link, link, link

Ad-blocking DNS

Monday, March 27th, 2006

So I was thinking about ad-blocking hosts files today, and it occured to me: how come ISPs don’t have ad-blocking DNS? It’d be a big selling point…

Content-Type/namespace mismatch

Thursday, March 23rd, 2006

What happens if you serve an SVG document (SVG namespace, only SVG elements) as application/xhtml+xml? What should happen?

(”Happen” of course meaning semantically.)

I suggest calling it “WVG”

Monday, March 13th, 2006

Maybe once I’ve finished HTML5, I can work on a new SVG to go with it.

Oh please please please yes

Commenting on someone’s blog…

Monday, March 13th, 2006

I have one profile I use normally, one I use only for a few things (with special settings, userContent.css, etc.), one I use when I need to be logged in to the same site with two logins at once, and one I use for testing that I constantly delete and re-make to clean it.

To use them, I have a main button in the panel that just calls path_to/firefox, and choose the profile I need, or if I need two at once I open a terminal and type path_to/firefox -no-remote. This fails in a small way in one particular circumstance: If the partial update has already downloaded, opening a second instance will install it, which can lead to minor breakages (XML error in download manager, e.g.) in the first. Other than that, though, it works perfectly for me.

Microsoft vs. The Web, chapter ?

Sunday, March 5th, 2006

Microsoft is trying to kill OpenGL. The Web is embracing it. Who will win?

Yet another would-be-nice-to-have firefox extension idea

Friday, March 3rd, 2006

You know what would be a really nice extension for bug testing in Firefox? Something that hooks into the profile manager and lets you create a one-use profile without having to go through the four-step “delete old clean testing profile/create new/type in name/finish” sequence. When you’re looking for a regression range and opening with a new profile each time over and over, the savings would really add up.

Fastback

Saturday, February 18th, 2006

So I’m reading the comments of a fastback memory usage post on Ben Goodger’s blog, and people are saying they rarely use the back button more than one or two times in a row, and storing 8 pages is maybe a little excessive.

And I just realized, I often use it not once or twice or eight times, but twenty or more. You see, I have a few html-based games I play, and when I’m moving around a map I can be loading over a page a second. And when I want to, say, go back and see the results of the last battle, that can be quite a few pages back even though it happened less than a minute ago.

Contradict that to slashdot where I open each story to read in a new tab and never use back at all, or google where, if I think I know what page I’m looking for but I’m wrong, I use it exactly once at a time. All in all, I think it’s pretty obvious that with such a wide range of usage even from just one person!, some sort of pseudo-intelligence is needed here.

As a disclaimer, I’ve never noticed any memory problems at all, though. Perhaps that’s because I have a gig of RAM and use Linux, and Linux’s memory management and multitasking/multi-userness generally pwns Windows’.

I need to stop lurking

Tuesday, February 14th, 2006

I really must start posting on www-html more, instead of just reading. As far as I can tell, the HTML WG hasn’t released a good spec since HTML 4. (And that I only count “good” as it was an obvious improvement over HTML 3.2; everything since then has been stagnant or worse in terms of good design.

Also, I need to post to the WHATWG list more, too. While it’s making definite improvements with HTML 5, it still doesn’t separate documents from application UI. That makes it “relatively good” as HTML 4 was, and non-relatively probably the best spec of its type there ever has been, but still not good enough.

(This post prompted by something Anne said.)

Localized content vs. localized presentation of content

Sunday, February 5th, 2006

Which is better: localized content, or localized presentation of content?

For example, which is better:

  • Serving

    <span class='date'>February 2rd at 8:30 PM EST</span>

    to me, and equivelant things to other users, or

  • Serving

    <style>.date{binding:datelocalizer.xbl;}</style>
    <span class='date'>2006-02-03T01:30Z</span>

    to all users

Documents

Friday, February 3rd, 2006

What is the semantic difference between the following:

  • <html xmlns='http://www.w3.org/1999/xhtml'>
    <head>
      <title></title>
    </head>
    <body>
      <p>This is a paragraph.</p>
      <object>
        <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2 2'>
          <circle cx='1' cy='1' r='1' fill='lime'/>
        </svg>
      </object>
    </body>
    </html>
  • <html xmlns='http://www.w3.org/1999/xhtml'>
    <head>
      <title></title>
    </head>
    <body>
      <p>This is a paragraph.</p>
      <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2 2'>
        <circle cx='1' cy='1' r='1' fill='lime'/>
      </svg>
    </body>
    </html>
  • <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2 2'>
      <foreignObject>
        <p xmlns='http://www.w3.org/1999/xhtml'>This is a paragraph.</p>
      </foreignObject>
      <circle cx='1' cy='1' r='1' fill='lime'/>
    </svg>
  • <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2 2'>
        <p xmlns='http://www.w3.org/1999/xhtml'>This is a paragraph.</p>
      <circle cx='1' cy='1' r='1' fill='lime'/>
    </svg>

(Feel free to correct my SVG, but that’s not what the question is about.)

Faster Scrolling

Wednesday, February 1st, 2006

Weird. I just noticed that with the new frame painting stuff from Bug 317375 even though most scrolling has slowed down, Hixie’s blog, which was always slow, has sped up tremendously. How strange.

div

Wednesday, February 1st, 2006

div, in current markup languages, has two uses:

  • Page structure, for grouping and separating parts of the page (e.g. separating the document from the template)
  • Document structure, for grouping and separating parts of the document when there is no more specific element

The end.

Overuse of Floats Considered Harmful linkage

Thursday, December 29th, 2005

Overuse of Floats Considered Harmful definitely deserves a link. I’ve thought the same thing for a while now, and do my best to avoid using them except for things like floating pictures in columns of text. You can tell, when you try to use them for overall page layout, that they just weren’t made for it and attempting it is hackish at best. Hopefully the new layout features of CSS 3 will arrive soon, and soon enough that float usage isn’t hardcoded into authors’ minds like table layout has been.


Bad Behavior has blocked 432 access attempts in the last 7 days.