Way to close the UA after forced file download?

M

MyndPhlyp

I am pushing a file download to the client. The ASP used to generate and
push the file is triggered by an <a target="_blank" href="something">. The
VBScript uses

Response.Clear
Response.ContentType = [some mime type]
Response.AddHeader "Content-Disposition", "attachment; filename=myfile.txt"
Response.Write [stuff]
Response.Flush
Response.End

All is working fine. The user is prompted for the disposition of the
download, the file is transferred. Life is wonderful ... except for one
minor annoyance ...

The user is left with a blank page (containing minimal skeletal HTML) in
front of them after the download.

Is there a way to eliminate the blank page without having to redirect back
to the calling page?
 
A

Adrienne

I am pushing a file download to the client. The ASP used to generate
and push the file is triggered by an <a target="_blank"
href="something">. The VBScript uses

Response.Clear
Response.ContentType = [some mime type]
Response.AddHeader "Content-Disposition", "attachment;
filename=myfile.txt" Response.Write [stuff]
Response.Flush
Response.End

All is working fine. The user is prompted for the disposition of the
download, the file is transferred. Life is wonderful ... except for one
minor annoyance ...

The user is left with a blank page (containing minimal skeletal HTML)
in front of them after the download.

Is there a way to eliminate the blank page without having to redirect
back to the calling page?

Yes, stop using the target attribute. The target attribute is deprecated
except for the Frameset element.
 
M

MyndPhlyp

Adrienne said:
Yes, stop using the target attribute. The target attribute is deprecated
except for the Frameset element.

I have found nothing indicating that the target attribute in anchors is
depreciated. The HTML 4.01 specifications do not show it depreciated plus
the W3 HTML Validator for DOCTYPES XHTML 1.0 Transitional and HTML 4.01
Transitional does not flag it as depreciated.

Cite your source.

(But yes, removing the target attribute does cure the symptom. Thanx.)
 
B

Bob Barrows [MVP]

MyndPhlyp said:
I have found nothing indicating that the target attribute in anchors
is depreciated. The HTML 4.01 specifications do not show it
depreciated plus the W3 HTML Validator for DOCTYPES XHTML 1.0
Transitional and HTML 4.01 Transitional does not flag it as
depreciated.

Cite your source.

Ummm, just do a google for deprecated target attribute.
 
M

MyndPhlyp

Bob Lehmann said:
You're right. It's not depreciated. Attributes retain their value throught
their lifetime.

It is, however, deprecated.
http://www.google.com/search?hl=en&safe=off&q=target+attribute+deprecated&spell=1

ROFL - and every time I have read "deprecated" my fogged brain plugged in
"depreciated." 'Bout time I was shown the error of my ways. Thanx.

I did do a little more digging. While the HTML 4.01 Specifications did not
list anything there were some other pages over at W3 that suggest one should
refrain from using it, seemingly primarily because of all the pop-up
blockers popping up (at the risk of sounding redundant). Maybe some day W3
will get around to adding that check in their HTML Validator. (Hey, it's
free so don't complain.)

One thing I don't understand is that W3 is still in favor of frames - an
element (structure?) not held in the highest respect among some circles
(and, to some, found to be akin to the blink tag that thankfully was never
fully embraced). I would have expected them to phase out frames before the
ability to spawn another browser instance. Ah well ... onwards.
 
K

Kyle Peterson

It is deprecated, but I wouldnt worry about it too much. Target attributes
are going to keep working for a long time and you are going to see then used
all over the place.
 
M

MyndPhlyp

Kyle Peterson said:
It is deprecated, but I wouldnt worry about it too much. Target attributes
are going to keep working for a long time and you are going to see then used
all over the place.

Yep. I use them quite a bit myself when a link goes out of the site. Thanx
again.
 
A

Adrienne

Yep. I use them quite a bit myself when a link goes out of the site.
Thanx again.

The reason the target attribute is deprecated for documents not in a
frameset is because it breaks that back button.

I use mouse gestures and am happily gesturing back when I realize nothing
is happening, then I look up and see the back button is disabled.

For some users this can be disorienting or confusing. Further, on some
systems with little resources, spawning a new window can be slow and eats
up even more resources.

Most people know how to use the back button, or back space, or gesture
back. Please don't break the browser's fuctionality. If the person
wants to go back to your site, they will.
 
K

Kyle Peterson

I am sorry but that is just plain stupid.
About as stupid as replaying to posts at the bottom of the message instead
of the top.
 
R

Roland Hall

in message
:I am sorry but that is just plain stupid.
: About as stupid as replaying to posts at the bottom of the message instead
: of the top.

to rebut your "stupid" comments...

Do you read a book from back to front?
Is the first paragraph of the book at the back and each subsequent paragraph
immediately preceding the prior?
Perhaps the table of contents reads from the bottom up?
How about page numbers?
Is this how you see the alphabet? zyxwvutsrqponmlkjihgfedcba
When you get a receipt, for any purchase, does it read up or down?
Do you answer questions before they are asked of you?

There are probably many reasons people top post so this may not be a
complete list...

....because the text cursor is at the top.
....because they got this ridiculous habit from email.
....because they're lazy.
....because they're selfish.
....because they just don't care.
....because they don't realize how difficult it is for someone to follow
along who hasn't read each subsequent post.
....because nobody ever showed them a different way and explained it to them.
....because they're an idiot. (You may fall into this category, among others)

But, I have a better question that I doubt you can answer.
If you feel it is stupid to bottom post vs. top post why would you include
the previous text? This is a newsgroup so the prior text is already posted.
Why repeat it?

It makes sense to repeat it if you bottom post so only the last post in any
thread need be read.
It makes sense to repeat relevant parts when *replying* inline as you would
with any conversation.
It makes no sense to include it when you top post because nobody goes to the
bottom of a message, scrolls up to find the last post, reads down, scrolls
up, reads down, scrolls up, reads down, etc. because that's stupid. Rather
(not Dan) they would then go to the first post and then read each one which
would negate the reason you probably top post.

So, either it's stupid to top post and include the prior text because it's
useless or because you think that's the way a message should read (scroll
down, scroll up, read down, scroll up, read down...).

You're in a newsgroup where each post in a thread is located below the
previous post. How can you then justify your method of posting which
conflicts with the way the newsgroup and your newsreader function, not to
mention the proper way to read/write the English language, left to right and
top to bottom?

Why didn't you respond with:
..pot eht fo daetsni egassem eht fo mottob eht ta stsop ot gniyalper sa
diputs sa tuobA
..diputs nialp tsuj si taht tub yrros ma I

or:

top. the of
instead message the of bottom the at posts to replaying as stupid as About
stupid. plain just is that but sorry am I

It would enforce your argument but yet it would still have the same effect
as you posted. It would be stupid.

Adrienne said, "Please..." be considerate of others and your response was
"that's stupid. Now let me talk about how stupid you post."

While I may not fully agree with Adrienne's comments, I don't think they're
stupid. I do however disagree with yours AND I think they're stupid, but
that's just my opinion.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
M

MyndPhlyp

Kyle Peterson said:
About as stupid as replaying to posts at the bottom of the message instead
of the top.

The accepted practice (at least by the majority participating in more
technically oriented NGs) is to bottom post as it places the text in
chronological order and allows for natural reading. Consider a single
posting that covers multiple points one wishes to comment on individually.
The respondent would normally find the section of interest, insert a couple
of blank lines, and respond in line beneath the section - again, top to
bottom. Another accepted practice is to trim signature lines. While it may
be desirable to retain all the text from the thread in the reply to place
things in context, it is common practice to limit the old text to no more
than 25% of the full posting preferably leaving only the bits needed to
illustrate the subject of the reply.

But all that is a matter for the 'Net police.
 
R

Roland Hall

in message
: Gazing into my crystal ball I observed "Kyle Peterson"
: <[email protected]> writing in
: :
: > I am sorry but that is just plain stupid.
: > About as stupid as replaying to posts at the bottom of the message
: > instead of the top.
: >
:
: Plonk!

Aww.. po' lil Adrienne can insult people for no reason but doesn't like to
be called on it but felt it was warranted to let me know they were ignoring
me, well, at least after the notice. So dramatic... ~sigh~
Some days are more fun than others. (O:=
 
C

Chris Hohmann

Bob Barrows said:
Huh? When did she insult someone? Did I miss something?

I think Roland went into postal mode but forgot to aim. :) Roland, Kyle is
the one your after. The rest of us are innocent bystanders.
 
C

Chris Hohmann

Chris Hohmann said:
I think Roland went into postal mode but forgot to aim. :) Roland, Kyle
is the one your after. The rest of us are innocent bystanders.

your = you're
 
R

Roland Hall

: Roland Hall wrote:
: > "Adrienne" wrote in message
: > : >> Gazing into my crystal ball I observed "Kyle Peterson"
: >> <[email protected]> writing in
: >> : >>
: >>> I am sorry but that is just plain stupid.
: >>> About as stupid as replaying to posts at the bottom of the message
: >>> instead of the top.
: >>>
: >>
: >> Plonk!
: >
: > Aww.. po' lil Adrienne can insult people for no reason
:
: Huh? When did she insult someone? Did I miss something?

No, I did. It's called a brain. I don't know why I thought Adrienne was
plonking me.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
R

Roland Hall

: : > Roland Hall wrote:
: >> "Adrienne" wrote in message
: >> : >>> Gazing into my crystal ball I observed "Kyle Peterson"
: >>> <[email protected]> writing in
: >>> : >>>
: >>>> I am sorry but that is just plain stupid.
: >>>> About as stupid as replaying to posts at the bottom of the message
: >>>> instead of the top.
: >>>>
: >>>
: >>> Plonk!
: >>
: >> Aww.. po' lil Adrienne can insult people for no reason
: >
: > Huh? When did she insult someone? Did I miss something?
:
: I think Roland went into postal mode but forgot to aim. :) Roland, Kyle
is
: the one your after. The rest of us are innocent bystanders.

I was actually taking up for her because I thought it was unwarranted and
then I made a stupid mistake. I guess I deserve to be plonked now.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
R

Roland Hall

:
: : > I think Roland went into postal mode but forgot to aim. :) Roland, Kyle
: > is the one your after. The rest of us are innocent bystanders.
:
: your = you're
:

Aw crap! You're right. I'm such an idiot and I thought I'd get wiser with
age. My apologies to Adrienne for my stupidity.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top