topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday April 16, 2024, 3:37 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Popping Downloads - iframe or meta refresh?  (Read 11037 times)

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,288
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Popping Downloads - iframe or meta refresh?
« on: March 03, 2011, 07:28 PM »
Which do you find a better way to pop a download? In an iframe? Or in a meta refresh?
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #1 on: March 04, 2011, 12:48 AM »
Don't use meta refresh. Some browsers and security tools block that.

worstje

  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 588
  • The Gent with the White Hat
    • View Profile
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #2 on: March 04, 2011, 01:00 AM »
No matter what method you use, it might get blocked. Some browsers block automatic refreshes, others block javascripts, and there are others that hate on iframes for varying reasons (security, ad-blocking).

If a browser and/or security tool blocks some function, it is because the user has it installed and very likely wants it blocked like that. So please, do not try to undermine the users wishes by finding a way around it.

So, in my eyes, the best method imo is to use an ordinary meta refresh (it is meant for this purpose!) combined with the usual 'if it does not download in a moment, use this link' thing.

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #3 on: March 04, 2011, 01:33 AM »
combined with the usual 'if it does not download in a moment, use this link' thing.

YES!  :up:

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,646
    • View Profile
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #4 on: March 04, 2011, 07:22 AM »
combined with the usual 'if it does not download in a moment, use this link' thing.
Is there a specific reason for not just starting with a plain link in the first place? This has always drove me nutz, because I'm forever having to hit the "This Link" link while wondering why the hell they didn't just start with something that works. ...Fixing things with damage perhaps?

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #5 on: March 04, 2011, 07:24 AM »
Is there a specific reason for not just starting with a plain link in the first place? This has always drove me nutz, because I'm forever having to hit the "This Link" link while wondering why the hell they didn't just start with something that works. ...Fixing things with damage perhaps?
:Thmbsup:
- carpe noctem

JavaJones

  • Review 2.0 Designer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,739
    • View Profile
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #6 on: March 04, 2011, 12:57 PM »
Is there a specific reason for not just starting with a plain link in the first place? This has always drove me nutz, because I'm forever having to hit the "This Link" link while wondering why the hell they didn't just start with something that works. ...Fixing things with damage perhaps?
:Thmbsup:
:Thmbsup: :Thmbsup:

- Oshyan

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,288
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #7 on: March 04, 2011, 04:52 PM »
combined with the usual 'if it does not download in a moment, use this link' thing.
Is there a specific reason for not just starting with a plain link in the first place? This has always drove me nutz, because I'm forever having to hit the "This Link" link while wondering why the hell they didn't just start with something that works. ...Fixing things with damage perhaps?



Sigh... :( Yes... There is a specific reason... "Freedom factories" (ads). By using a specific download page that pops the download and has a "if your download doesn't being in 5 seconds, click here" link, you have the opportunity to serve up an ad. Sourceforge, CNET, and virtually all software directories of note use this method.

Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,646
    • View Profile
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #8 on: March 04, 2011, 05:51 PM »
Yes... There is a specific reason... "Freedom factories" (ads).
Gee Wizz, when you put it that way shoving my pecker in a meat grinder sounds like a swell idea...

...But if it must be done, as worstje said an ordinary meta refresh (not the script encrusted looping nightmare variety) would be the lessor evil.

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,288
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #9 on: March 04, 2011, 05:57 PM »
Yes... There is a specific reason... "Freedom factories" (ads).
Gee Wizz, when you put it that way shoving my pecker in a meat grinder sounds like a swell idea...

...But if it must be done, as worstje said an ordinary meta refresh (not the script encrusted looping nightmare variety) would be the lessor evil.

I hate the idea of having ads... But... Nobody else is going to pay my bills... :(

I suppose I'll be looking at a meta refresh though. That's my first choice, but I'm still not completely sure it's the right way to go now.
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,646
    • View Profile
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #10 on: March 04, 2011, 06:47 PM »
I hear ya man.

But iFrames are just such a kludge I tend to avoid them reflexively. Is there anyway of doing plain links with an ad? Download page with a banner type of affair perhaps? That way the ad shows even if they don't "commit", and if they do commit, they aren't bothered.

Just a thought - I like have your cake and eat it too type solutions.  :D

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,288
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #11 on: March 04, 2011, 07:26 PM »
I hear ya man.

But iFrames are just such a kludge I tend to avoid them reflexively. Is there anyway of doing plain links with an ad? Download page with a banner type of affair perhaps? That way the ad shows even if they don't "commit", and if they do commit, they aren't bothered.

Just a thought - I like have your cake and eat it too type solutions.  :D

Well, it's going to be JavaScript. There's no getting around it.

IE7/8 breaks downloads for both meta refresh and iframes. I've tried 4 different approaches. I think the only way will be to script it to filter for IE.

It's just nutty. It will pop a save as dialog, but then tries to save "download_exe" instead of "download.exe". Sigh...

If we didn't have such problems with malware, this wouldn't be an issue.

The story board will basically be like this:

* PAGE - Product page (download link to download page)
* USER ACTION - User clicks DOWNLOAD link > taken to product download page
* PAGE - Download page with freedom factories :)
* SCRIPTING - Script determines browser & pops download for non-IE browsers (direct download link for backup as described above)
* PAGE MODIFICATION - IE receives IE specific message & download link to click
* IE USER ACTION - IE users click download link for direct download

It's really just so entirely messy... I try to keep all code to an absolute minimum whenever possible. Less code = better code.

Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,288
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #12 on: March 04, 2011, 10:25 PM »
Ooops... I forgot... I was testing locally from the file system... (Totally different behavior in IE.)
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,646
    • View Profile
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #13 on: March 05, 2011, 12:51 PM »
What about an unbuffered (allowing it to run in "spurts") server side script? Download "link" connects to page that displays Ad for X seconds, and then redirects directly to target file.

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,646
    • View Profile
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #14 on: March 05, 2011, 12:58 PM »
Alternate line of thought:

Actually the problem with sites like CNet is the whole thing is a download page. But if you are planning something fairly small (e.g. less than a bazillion downloads) You could just route folks to a single download page that had a list of straight links and an ad or two displayed on said (single collective DL) page ... The end result should actually be about the same (display rate wise).

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,288
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #15 on: March 05, 2011, 04:37 PM »
What about an unbuffered (allowing it to run in "spurts") server side script? Download "link" connects to page that displays Ad for X seconds, and then redirects directly to target file.

Well, it's mostly like that right now. I went back and put in a meta refresh, which works for IE (8) in other sites, but it's not working for me at the moment. VERY odd.

Clicking a normal link works... But the meta refresh and simply putting the download address into the address bar of IE don't work.

Screenshot - 2011-03-06 , 9_28_44 AM.pngPopping Downloads - iframe or meta refresh?

Sigh... Some days... Anyways... Back to trying to hack through the nonsense for a solution.

I don't know why, but sometimes it seems like even the simplest things create silly problems.
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,288
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #16 on: March 06, 2011, 11:01 PM »
Back to work today. :)

The problem was Internet Explorer doesn't like the "application/octet-stream" MIME type for meta refresh or iframe downloads. I posted about it here:

http://cynic.me/2011...-this-internet-site/

Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

Mattphoes

  • Participant
  • Joined in 2011
  • *
  • default avatar
  • Posts: 13
    • View Profile
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #17 on: March 14, 2011, 03:08 PM »
I HATE popups. Why not let the user click?

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,288
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: Popping Downloads - iframe or meta refresh?
« Reply #18 on: March 14, 2011, 04:32 PM »
I HATE popups. Why not let the user click?

The only thing that pops up is the download. This is the same way that you get downloads at Sourceforge, CNET (download.com), and most major download centers/sites.

It's not a pop up window though if that's what you're thinking. Like you, I can't stand those. It is rare that you actually need a pop up window. Most problems can be solved with a floated div or lightbox or something like that. They are less intrusive and load faster. The problem there is that if you want to do something, you must script it and usually end up using AJAX. That's good and bad, but more good than bad.

There are a few reasons to do it that way though. The main one is so that you can have a page with ads for the visitor while they are downloading.

Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker