Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 25th, 2006, 10:45 AM
Elie Grouchko
Guest
 
Posts: n/a
Default ASP Page executed twice

Hi

I have an ASP page which is randomly (?) executed twice. I noticed that the
http header is different, as if there are two different requests sent to the
server. Header 2 below is the one that randomly occur.

Although the 2 headers are different I don't understand why

Help will be greatly appreciated

Thanks

Elie Grouchko


Header 1

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */* Accept-Language:
en-nz Connection: Keep-Alive Host: localhost Referer:
http://localhost/mysite/page.asp?sub...=2&forumpage=3 User-Agent:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cookie: userloginname=; ASPSESSIONIDCATRATAC=HGBDLENCAPADIEKHFACKMMFK
Content-Length: 230 Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate Cache-Control: no-cache

Header 2

Accept: */* Accept-Language: en-nz Connection: Keep-Alive Host: localhost
Referer: http://localhost/mysite/page.asp?sub...=2&forumpage=4
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
1.1.4322) Cookie: userloginname=;
ASPSESSIONIDCATRATAC=HGBDLENCAPADIEKHFACKMMFK Accept-Encoding: gzip, deflate


  #2  
Old February 26th, 2006, 01:05 PM
Elie Grouchko
Guest
 
Posts: n/a
Default Re: ASP Page executed twice

Hi again

I resolved this issue, and wanted to share the solution as it may be of some
help to others.

On the specific page I was having a problem I am creating HTML code on the
client side using the JavaScript 'document.write' method. One of the tags I
am creating is an image <img src="" ... />. My plan was to populate the
image at a later point so I left the 'src' property empty, which was a
mistake... The img.src property is required, so the browser assumes that an
empty img.src property means the root URL, and was sending another GET HTTP
request and reloading the entire home-page.

Moral: don't leave the img.src property empty...

:-)

Elie


"Elie Grouchko" <elie@ortel.co.nz> wrote in message
news:Os8ijcfOGHA.3984@TK2MSFTNGP14.phx.gbl...[color=blue]
> Hi
>
> I have an ASP page which is randomly (?) executed twice. I noticed that
> the http header is different, as if there are two different requests sent
> to the server. Header 2 below is the one that randomly occur.
>
> Although the 2 headers are different I don't understand why
>
> Help will be greatly appreciated
>
> Thanks
>
> Elie Grouchko
>
>
> Header 1
>
> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
> application/x-shockwave-flash, application/vnd.ms-excel,
> application/vnd.ms-powerpoint, application/msword, */* Accept-Language:
> en-nz Connection: Keep-Alive Host: localhost Referer:
> http://localhost/mysite/page.asp?sub...=2&forumpage=3 User-Agent:
> Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
> Cookie: userloginname=; ASPSESSIONIDCATRATAC=HGBDLENCAPADIEKHFACKMMFK
> Content-Length: 230 Content-Type: application/x-www-form-urlencoded
> Accept-Encoding: gzip, deflate Cache-Control: no-cache
>
> Header 2
>
> Accept: */* Accept-Language: en-nz Connection: Keep-Alive Host: localhost
> Referer: http://localhost/mysite/page.asp?sub...=2&forumpage=4
> User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
> CLR 1.1.4322) Cookie: userloginname=;
> ASPSESSIONIDCATRATAC=HGBDLENCAPADIEKHFACKMMFK Accept-Encoding: gzip,
> deflate
>[/color]


 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles