Skip to main content

Bug Tracker

Side navigation

#10376 closed bug (invalid)

Opened September 29, 2011 06:53AM UTC

Closed September 30, 2011 10:28AM UTC

Last modified March 09, 2012 10:04PM UTC

ajaxStart() is inadvertently fired when the page is loaded through HTTPS and getScript() calls the same domain via HTTPS too

Reported by: vbenincasa Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:
Description

ajaxStart() is inadvertently fired when the page is loaded through HTTPS and getScript() calls the same domain via HTTPS too.

Bug occurs (https) -an alert shows "booom"-:

https://unihostbrasil.com.br/diversos/bug-jquery-ajaxstart/

Bug doesn't occurs (http):

http://unihostbrasil.com.br/diversos/bug-jquery-ajaxstart/

It does not occur if:

  • The page with the script isn't called through HTTPS (sample above)
  • getScript() doesn't call the same domain through HTTPS

Additional info:

  • Occurs with all jQuery versions (since 1.0)
  • Tested and reproduced under Firefox 7, Chrome 14, IE 8 and Opera 11.
Attachments (0)
Change History (4)

Changed September 30, 2011 10:28AM UTC by jaubourg comment:1

resolution: → invalid
status: newclosed

That's not a bug at all... Oo

Changed September 30, 2011 11:26AM UTC by vbenincasa comment:2

Replying to [comment:1 jaubourg]:

That's not a bug at all... Oo

Why not? ajaxStart() cannot be invoked just if the page is loaded through HTTPS (and getScript() call the same domain through HTTPS too). It is expected the same behavior independent of the protocol.

Changed October 02, 2011 03:22PM UTC by jaubourg comment:3

Replying to [comment:2 vbenincasa]:

Replying to [comment:1 jaubourg]: > That's not a bug at all... Oo Why not? ajaxStart() cannot be invoked just if the page is loaded through HTTPS (and getScript() call the same domain through HTTPS too). It is expected the same behavior independent of the protocol.

Not it's not. Different protocol means a different domain altogether and, as specifically stated on jQuery's documentation, global events are not supported for cross-domain requests BUT they WILL be fired for same-domain requests.

What you need is to set the global option to false. Which means that:

  • you use ajax instead of getScript for better control,
  • OR you set global to false globally using ajaxSetup

Changed October 07, 2011 04:06AM UTC by vbenincasa comment:4

Tks for your response. You're right, I had problems with browser caching that masked my tests, sorry for the inappropriate bug report.