Sunday, March 20, 2011

Meta Refresh: Count starts after page load or before?

<meta HTTP-EQUIV="REFRESH" content="0; url=">

Does the count start from full page load or as soon as the page is loading.

Having tested it, it looks to me it starts counting after full page load?

I appreciate a confirm before I continue with this solution. I didn't like Javascripts timeout.

Will this play nicely with IE6?

From stackoverflow
  • I think after page load too, and Yes, its working well with IE6.

    but best way is the redirecting with 301, 302 URL redirection from server, Meta Refresh is kind of deprecated one, still working though.

    T.J. Crowder : `refresh` has a different purpose than a 301 or 302; it allows presenting a page and then refreshing it (or replacing it) *after an interval*. (But good to point the author at 301 and 302 in case they're more appropriate for what he's doign.)
  • I expect it's implementation-dependent when this happens (although that doesn't mean all implementations don't do much the same thing; one would have to test). The HTML5 spec doesn't address when the countdown begins.

    But how much does it really matter? The time is in seconds, and we're all shooting for sub-second page load times anyway, right? ;-)

    IE6 respects the refresh header, yes (including as a meta tag).

    Andrzej Doyle : More importantly - we're all shooting for post-1990s, non-deprecated techniques, so are using one of the many proper alternatives instead of meta-refresh tags, right? ;-)
    T.J. Crowder : @Andrzej: :-) I didn't realize (tsk!) it was deprecated until Daniel's comment above; and I find it odd that they don't mention that in the HTML5 spec, I wonder if that deprecation is outdated. I'm not seeing a non-JavaScript alternative for certain use cases; in the absense of one, it seems inappropriate to deprecate an existing mechanism. They may have gotten feedback on that.
    Daniel Vassallo : @TJ Crowder: It looks like W3C may have deprecated the deprecation for meta-refresh in HTML5 :)
    T.J. Crowder : @Daniel: LOL! (....15....)


Post a Comment