When using my ASP.Net app, which heavily relies on javascript and jQuery, along with master pages and .Net Ajax components, I consistently encounter an issue in IE 6 (and sometimes IE 7) where the status bar displays messages like "2 items remaining" or "15 items remaining," followed by "loading somegraphicsfile.png|gif." This message seems to persist and may potentially hinder certain page functionalities (although this is not confirmed).
This problem can be replicated almost every time by simply refreshing a .aspx page, but the number of items mentioned and the specific file being referenced vary. The numbers usually fall between 2, 3, 12, 13, or 15.
After searching for solutions online, there have been multiple suggestions and explanations provided. However, some of these recommendations do not work for our situation, while others are impractical for us to try.
Here are some of the theories offered:
IE might not be caching images properly, leading to repeated requests for the same image causing delays. This commonly occurs when an image is displayed multiple times on a page, prompting the server to expect local caching rather than continuous re-requesting. Although the images display correctly, IE waits indefinitely for a response that never arrives. Typically, the file it mentions as 'loading' is one that appears repeatedly on the page.
The use of PNG graphics with transparency could be causing issues. While the application indeed uses such graphics, they are generated through jQuery-UI Themeroller and should be compatible with IE according to jQuery-UI experts. These PNGs are only used within CSS references. Attempts to switch some graphics from PNG to GIF did not resolve the problem consistently, as it still alternated between waiting for somegraphicsfile.png and somegraphicsfile.gif.
Images specified in CSS and/or JavaScript may be affecting unloaded elements (e.g., those set to display: none). While this hypothesis could hold true, preloading images failed to alleviate the issue thus far.
It's possible that IIS's caching policy confuses the browser, particularly with Microsoft server software struggling to communicate effectively with Microsoft's own browser. Unfortunately, limited control over the hosting IIS configuration complicates resolution from my end.
Has anyone encountered this issue and discovered effective strategies to address it? Particularly within ASP.Net applications utilizing jQuery and jQuery-UI?
UPDATE
Adding another observation: disabling the setup for the jQuery-UI Datepicker component on at least one page resolved the problem, though it remains uncertain whether this fix applies universally across all affected pages. If implementation proves successful, alternative plugins may need to replace the existing functionality. Notably, no current open issues regarding jQuery-UI compatibility with IE6/7 have been identified.
UPDATE 2
Upon reviewing IIS settings, the "enable content expiration" option had NOT been selected for any folders within my project. Unchecking this setting was touted as a common solution to rectify the persistent loading issue.
A simpler webpage consistently triggers the error. Despite trying both jQuery-UI 1.6rc6 and 1.7.1 versions, the problem persists exclusively when reloading the page containing the jQuery-UI Datepicker feature. Analyzing the situation reveals several key observations:
- The status continuously indicates "(1 item remaining) Downloading picture http:///images/Calendar_scheduleHS.gif" solely during reloads.
- HTTP logs confirm repeated requests for said image whenever the feature activates, disregarding cache considerations.
- All requests for this graphic complete successfully, displaying the image accurately. None return codes 200 or 304 signifying varied cached responses. The insistence on awaiting completion of an already fulfilled request remains puzzling.
- A separate page investigated under HTTP traffic monitoring also experienced the "n items remaining" status, referencing two distinct UI PNG files with a code 304 indicating unmodified status. Interestingly, neither matched the alleged image causing the delay.
- The error substantially hampers page responsiveness. For instance, attempting client-side actions often lead to page refreshes instead of expected outcomes.
- Exiting to and revisiting the page does not evoke the error again.
- Migrating scripts and their references towards the content bottom failed to impact the persisting problem. Script execution within $(document).ready() continues unhindered without practical separation unless absolutely necessary.
FINAL UPDATE AND RESOLUTION
While various answers and suggestions were presented, none precisely addressed our dilemma. A close contender pointed toward prolonged JavaScript operations, warranting the associated bounty award (though self-redemption was contemplated, recognition for helping towards resolving the issue holds more appeal).
Ultimately, we pinpointed a root cause: unique instances of jQueryUI datepickers created via $(document).ready event triggered conflicts within scripts embedded into ASP.Net master pages. Locally running scripts would nullify these datepickers under specific conditions, necessitating 'destroy' commands due to prior disability issues. Upgrading to the latest jQuery UI version (1.7.1), replacing 'destroy' with 'disable' for the datepickers, largely eradicated the problem (with minor lingering potential when performing rapid actions during ongoing page loads).
An explanation illuminates how events unfold:
- The initial page load entails numerous text boxes designed with the datepicker class.
- Master page scripts uniformly introduce datepickers onto designated text boxes.
- IE independently queues graphic requests per calendar entry owing to inadequate dynamic asset caching regulations.
- Concurrently, client script erases these datepickers preemptively, rendering the associated graphics redundant.
- The result: IE grapples with unresolved requests, clueless on appropriate course of action.