Safari Page Loaded

I've read others here and have tried the
"do JavaScript "document.readyState" in document 1" loop.
The problem is I get a complete return before the page is done. I seem to get it when the connection is made not when the page is completely loaded,
I'm not up on Java or html but I think it uses a "Active Server Page". It has .aspx? followed by a long line of key numbers.
Is there a way or different term other than "complete' for the line of java that will make it wait until the page is done. Delay in the script just won't work as the page may take a couple to many seconds to load.
Any help is greatly appreciated.
Marshall

I use this arrangement:
in the main script - to pause until the page is loaded:
If my page_loaded(50) ...
and then the subroutine:
on pageloaded(timeoutvalue)
delay 5
tell application "Safari"
repeat with i from 1 to the timeout_value
If (do Javascript "document.readyState"in document 1) is "complete" then return true
delay 1
end repeat
end tell
return false
end page_loaded
This works most of the time, but I have observed problems when my PowerBook is overloaded - or there's heavy network activity - when it seems that the document readystate tests true halfway thru the actual page load. This is for no apparent reason other than these loads and almost seems as though Safari might be 'giving up' and changing the readystate precipitately! You could try testing for "loaded" as well to see if that helps.

Similar Messages

  • Safari page load problems and 10.5.3

    Since I have upgraded to 10.5.3, I am experiencing Safari page load problems on all my user accounts on my 2.0 GHz Core Duo Black MacBook. I have reviewed threads in this forum and that of the Safari forum with no solution that solves the problem. so I post here in hopes of additional expert solution ideas.
    *The Problem:* Since upgrading to 10.5.3 Safari fails to complete page downloads for some, but not all websites. When these same websites are accessed with Firefox there is no problem. With Safari the page load will stop at about 75% completion, or the page will not load at all.
    Here is an example of a webpage that will not complete: http://www.realclearpolitics.com/
    Here is an example of a webpage that will not load at all: http://cherylsguitar.com/site (my wife's business)
    I also have a G4 iMac running 10.4.11 on the same WiFi network that does NOT experience the Safari page load problems. All is good and speedy on this trusty machine.
    *Solutions Attempted:*
    - Deleted plist (with no effect)
    - Re-installed Safari from Leopard disk (with no effect)
    - Scoured User Preferences in Library for offending applications, plug-ins, etc.
    - Reset PRAM
    - Reset and examined cable modem and router (AirPort Extreme 802.11g)
    *Hardware and Network info:*
    - 2.0 GHz Core Duo Black MacBook
    - 2 GB Ram
    - AirPort Extreme Base Station (generation 1) running 802.11g

    Allan Eckert wrote:
    Hi Perry Lehman;
    Have you cleared out your cookies?
    Allan
    Allan,
    Yes. I have reset Safari clearing all but website icons with no effect. I also tried turning of the Safari pop-up blocker with some very limited success. Disabling pop-up blocker will marginally help page load speed for some websites, but others still fail to load at all.
    Thanks for taking time to post.

  • Same, unwanted old Safari page loading for months

    iPad 3, 7.1.2. Private browsing. History and cookies/cache cleared after every session. Not using any other device that talks to this iPad. Connected via wifi.
    Problem: On Safari launch, the same page either flash appears or stays on til something else is selected. Also the same page appears after opening a mail link URL. The page appears only some of the time and has been appearing for at least six months. Part of its URL is videos.android...
    Question: how to stop this?
    Thanks in advance...

    Hi and Welcome to Apple Discussions
    Some routers are better than others on a Mac. It's all about the firmware and the degree of compatibility built into it by the developer. Make sure you have the latest Netgear firmware installed on the router. Check the support page on Netgear's site.
    Also, in the Netgear Router preference panel, add these DNS server codes, which may facilitate the page loading on the Mac - 208.67.220.220 and 208.67.222.222. There are OpenDNS codes, which have been shown to be much more efficient for Safari than those used by Internet Providers.

  • IPad safari page load hang

    ok folks.  Long time listener, first time caller.  I've been using the forums for years to research and occasionally even solve ( ;-) ) problems with various and sundry things apple.  My turn.
    I have an iPad mini I got as a birthday present in 2013 (a "mini-pad" as my wife refers to it, late 2012, 16GB, wi-fi only).  I love it, got no major problems with it.  However...
    Throughout the mini-pad's life, using iOS 6, 7, and now 8, I have had the problem where web pages in Safari would hang while loading.  Not crash.  Just.  Stop.  It doesn't matter if I type in the URL or select it from a bookmark.  It doesn't matter if I'm running in regular or private mpode.  It doesn't matter if I'm on my wi-fi or somebody else's.  I've changed wi-fi routers over this time - no diff.  I've moved and changed ISPs (no, not to solve this problem) - no diff.  I've task-managered out of all programs and rebooted.  No diff.  Still the problem persists.  The page starts loading and stalls.  It may or may not continue loading if I gave it enough time, but if it's been longer than 10 seconds with no signs of progress I've found that there's no reason to wait longer.  Yes, I have no patience.  Canceling the load and reloading works...mostly (mostly).  Sometimes it takes 2 or 3 tries, but eventually the page will load.  Mostly.  Other, non-iOS devices on the SAME FRAKKIN NETWORK can load the exact SAME FRAKKIN PAGES with no issue whatsoever.  It's not always the same page with the issue.  Some nights it's page X, sometimes Y, sometimes, X, Y, Z, and points beyond.  I've moved to some other device to load the SAME PAGE and invariably it works just hunky dunky.  ****, I've even changed my DNS settings on the mini-pad and both of my routers.  No. Diff.
    A sample of the "other devices" - MacBook Pro OSX 10.7 Safari, Firefox, and Chrome; Windows 7 laptop; windows 7 desktop; MacBook Air OSX 10.9 Safari and Chrome.  Some of those are running a browser with AdBlock or other addons to reduce the amount of cruft loaded for each page.
    Background:  I'm not an idiot or a some found-it-in-a-forum hack.  I've been developing software for 30+ years.  I've built and repaired hardaware many of you haven't heard of, configured routers, decoded binary file formats, debugged modem connection strings, designed complex software, and forgotten more languages than most of today's green-ear grads have ever heard of.  I work equally adeptly in a 'doze, *nix, OSX, GUI, command line, with mouse, without mouse.  But this MF has me stumped.
    No, I'm not going to jailbreak.  Pleas don't start.  I'm not morally opposed to it, but IMO it ain't worth the effort.  Work within the system, boyos (and girlos)
    ***, mates?  any ideas?  Is it the lack of adBlock on the mini-pad? Or something else I've simply got blinders about and I'm 100% missing?
    mucho appreciato kids.

    Well if nothing else, reading your post was entertaining to me. Thanks. I appreciate it.
    Can I assume that you tried the basics ... resetting network settings, resetting all settings, clearing Safari...?
    I was trying to help my niece with a similar issue just like yours where Safari would hang and hang and take forever to load a web page. Quite by accident, I found that she had some bizarre website listed in her WiFi settings. When I tapped on the Info circle next to her WiFi network name, there was a website at the bottom of the screen under the proxy settings and I had never seen anything like that before. I had no clue what it was, but I took a shot and deleted it. As soon as I did, Safari started working normally again.
    BTW.... Discussion of jailbreaking or suggesting that as an alternative will get your comments booted from this support forum as Apple does not appreciate their iOS being hacked, so nobody here is likely to suggest that to you. That would also void your warranty and open your device up to all sorts of other ugly problems.

  • Mavericks Reboot, and Safari Page Loading Errors

    I've had my iMac (21.5" 3.06 i3) for about 3 years running just great.  Never an unexpected reboot or any problems related to web browsing with Safari.  I upgrade the software to Mavericks when it was released.
    Now the problems have set in.  Daily, Safari gives me a warning that it had to re-launch a web site because it failed to load properly (a first its ever done that).  There is no reson or consistancy with the pages/sites that it dose this on.  And worse yet, within the last two weeks or so...the iMac just shuts down, and reboots (PC Blue Screen of Death) syndrome.  And now this is becoming repeat offence.
    I have Avast as an anti virus and completed full scans, nothing seems to be the problem there.
    So is anyone else having issues with these two problems as they most likely are related to Mavericks...at least thats the only thing thats changed since the problems have appeared.
    Any thoughts?

    Avast is the problem.
    Uninstall Avast >  How to completely uninstall avast! Free Antivirus from a PC or Mac | How to | Softonic
    Enable Gatekeeper to prevent malware.
    Open System Preferences > Security & Privacy then select the General tab.
    Make sure either Mac App Store or Mac App Store and identified developers is selected. If that area is grayed out, click the padlock icon to proceed.
    OS X: About Gatekeeper
    I have Avast as an anti virus and completed full scans
    There's nothing to scan.

  • Safari pages load don't display in mountain lion

    Since upgrading to Mountain Lion on my 2011 Mac Mini Safari loads the pages however there is nothing visable on the display except for white screen. I have to browse now using Google Chrome. I disabled all extensions and restarted many times with the same results.

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up a guest account” (without the quotes) in the search box. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem(s)?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault in OS X 10.7 or later, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    *Note: If FileVault is enabled under OS X 10.7 or later, or if a firmware password is set, you can’t boot in safe mode.
    Test while in safe mode. Same problem(s)?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

  • Safari -- Pages wont load

    Hello,
    We bought an iMac about a year ago, and it's been perfect. However, starting about yesterday, whenever I would try to load a page like ESPN, Safari would freeze up because the ads won't show up. This has happened on a lot of sites, and I can barely go on a site without it freezing up. I tried emptyin the cache, but that has made no difference. Can someone help me out? Thanks.

    My Safari page load hangs were being caused by long URLs being split across packets by Safari that were not liked by my new SonicWall firewall. Firefox does not seem to split long URLs across multiple packets, so Firefox works fine with Sonicwall. My temporary fix was to turn off the CFS Content Filtering Service to allow Safari to complete loading pages. The solution that allows turning CFS back on is outlined below.
    Examples of pages that were hanging were www.delta.com home page and even apple.com discussion boards. When I encountered a page that would not fully load (blue bar in URL would not fully complete), I click on the X in tool bar to cancel the loading page. Then choose Window>Activity. URLs that showed status "cancelled" were very long URLs, typically related to advertisements or metrics collection.
    The following document shows the "hidden" Sonicwall option change that fixed the problem for me.
    http://www.radiotope.com/content/safari-and-sonicwall

  • How come my safari pages won't stay loaded?

    Safari page loads for 3-5 seconds then returns to either desktop or start-up page.

    See if the following help.  Try clearing Safari's cache : Settings > Safari > Clear Cookies And Data (Clear Cache on iOS 4) and also Clear History
    If that doesn't work then try closing Safari completely and then re-open it : from the home screen (i.e. not with Safari 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Safari app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    A third option is a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.
    If you are on iOS 5 then turning off iCloud and multitasking gestures might also help

  • Every time I open a new Safari page, it loads the one(s) that are already open, instead of taking me to a new start page.

    Every time I open a new Safari page on my MacBook Pro, it load the one(s) that are already open, instead of a new page. it's 8.0.2.  I already went to Preferences and it says new page will open to Favorites....but it doesn't.

    Hello beany1818,
    Also check in Safari Preferences and look in the Safari Opens with and make sure that it is set to “with a new window” and not “all the windows from your last session”. Take a look at the article for more information.
    Safari 8 (Yosemite): General pane of Safari preferences
    http://support.apple.com/kb/PH19247
     Regards,
    -Norm G. 

  • Safari Page Won't Load When Connected to Plasma TV as Monitor

    I am a new Mac user and was hoping someone could help me with this issue. I have a MacBook Pro 13" laptop running Mac OS X (10.6.2) and the latest version of Safari (4.0.4) and when I connect it to my Plasma TV using the displayport to DVI adaptor, Safari pages never load. It just shows loading and finally gives an error stating that the server can't be found. If I immediately unplug the external display and reload the page, it loads fine. All other applications function and display fine. The resolution of the monitor is 1024 x 768. I have also connected the laptop to my HP 20" monitor using the same connection and everything works fine. Its resolution is 1280 x 800. My ISP is Comcast and it is being delivered using a linksys wireless router. Does anyone have any insight as to why this is happening or what I am doing wrong? Any help you can give me would be greatly appreciated.

    Hello, SockMonkeyGirl.  
    Thank you for visiting Apple Support Communities.  
    I understand that you are unable to use your internet based applications when connected to the Comcast network only.  I would recommend making sure that this Comcast network settings are updated to the recommend as outlined below.  Also make sure that all firewalls are disabled as well.  
    iOS and OS X: Recommended settings for Wi-Fi routers and access points
    http://support.apple.com/en-us/HT202068
    Cheers, 
    Jason H.  

  • Help-Safari wont load any pages-others having same problem

    Safari wont load any pages. Tried reinstalling Safari. Nothing. Zip. Notice that people on the Safari for Windows board are having the same problem.
    WHAT IS GOING ON? Anyone know?
    I get the menu bar, but not Bookmarks, etc. Cannot see a blank page. Cannot open a blank page, BUT my efforts (Untitled and Untitled 2) are reflected in the Dock. A right-click there shows that the pages are open, but obviously invisible.
    I really need to fix this.
    Firefox works. As do other apps.
    Message was edited by: mashamax
    EDIT:
    The last thing I did before this happened was open a .pps file I got in email. If I do what was suggested in the Safari for Win post where someone is having the same problem: empty the cache, everything becomes greyed out. Its as if everything becomes invisible.
    If I click on a link in Apple Mail, the URL shows up in the dock right-click as if it has mounted, but it hasn't. No window. Nothing.
    Message was edited by: mashamax

    Do you actually have a data plan from your cellular provider?
    Being connected to 3G does not automatically indicate that a data plan exists on the account or is even set up correctly on the carrier side.

  • Safari Not Loading Web Page Fully

    I was wondering if anyone has encountered this problem.
    Occasionally and randomly when I try to load any web page in Safari (v3.2.1) it stalls half-way through the process. But when I launch another browser like Firefox (and it does connect to a pre-defined web page), immediately Safari completes loading the web page.
    Any ideas why this is happening?

    Hi Carlton
    With some internet providers Safari seems to function more efficiently in the page loads by adding DNS server codes to the Network settings.
    In your System Preferences>Network panel, select your internet connection (airport or ethernet), then select "advanced". In the DNS panel, enter these codes on separate lines by clicking the + key:
    If you live in the US 4.2.2.1 and 4.2.2.2
    Outside the US 208.67.222.220 and 208.67.220.222
    Select "OK", then "apply".
    Restart Safari. Go to the Safari Menu>Empty Cache. Then try some page loads.

  • Web pages load slowly using Safari, Firefox, and Chrome.

    Web pages are loading slowly now on my mid-2008 iMac 2.66 Ghz Intel Core 2 Duo. 
    Doesn't seem to matter if I use Safari v5.1.10, Firefox v29.0.1, or Chrome v34.0.1847.131. 
    Problem started about a week ago mostly with YouTube but now I have issues with almost all web pages loading slowly, including this one.

    Try resetting both your Intenet MODEM/Router by unplugging them, waiting 15 to 20 seconds then plugging them back in.

  • Safari not loading web pages

    My mom's Powerbook is no longer able to load web pages through Safari. Her email works, as does iChat, so it isn't her internet connection. Other users on the same network can load web pages, so it isn't the service provider. I have had her reset safari, as well as remove the preferences file, and the same thing happens (the 'loading' message appears but nothing ever loads).
    Any suggestions what to try next?
    Thanks!
    Brian

    HI Brian,
    From the Safari Menu Bar, click Safari / Empty Cache.
    If that doesn't help, go to ~/Library/Caches/com.apple.Safari/ Move the Cache.db file to the Trash
    If that didn't help...
    Go to ~/Library/Internet Plugins and /Library/Internet Plugins. If there are plugins in either of those folders, move them to a temporary location on the Desktop. With Safari open, from the Menu Bar, click Safari/Preferences and click the Security tab. Make sure Enable Plugins is selected. See if Safari can load web pages. If not, move those files back to the appropriate folder.
    Go to /Library/Input Managers. Move any input managers from that folder to the Desktop and relaunch Safari.
    Might be a web clip causing the problem. Open Dashboard and remove any web clips.
    If she is running Tiger 10.4.11, open System Preferences/Software Updates - Installed Updat4es and make sure she has the 2009-002 Security update installed. If not, download and install it here.
    http://support.apple.com/downloads/SecurityUpdate_2009_002__Tiger_PPC
    If her PowerBookG4 has the original hard drive, 40 or 60GB?, it might be a lack of free disk space.
    Right or control click the MacintoshHD icon. Click Get Info. In the Get Info window you will see Capacity and Available. *Make sure you always have a minimum of 10% to 15% free disk space at all times.*
    Carolyn

  • Slow Web Page Loading in Safari & Firefox

    A few months ago, Safari began loading web pages extremely slowly, regardless of the Internet connection. I don’t recall doing anything special at the time; it just kind of started all of a sudden. I thought it might a problem with Safari, so I downloaded Firefox. Although Firefox was a bit faster at first, it quickly (over the course of about 1 week) slowed down as well. To reiterate, the browser application itself was loading quite rapidly, yet the web pages were taking a very long time. On average, it takes more than 90 seconds to load a web page as simple as Google.com. Before this problem began, a web page would usually take an average of about 15-20 seconds to load. I am sure that it is NOT due to my Internet connection because the problem remains regardless of whether I am at home (where I have a cable connection) or at work (where I know the Internet connection is very reliable). To further support this, my roommate who has a 4 year old Dell PC loads web pages using Internet Explorer significantly faster than I do (with my 2.5 year old MacBook Pro). I have not noticed any kind of performance decrease with any of my other software or hardware; the computer still starts-up quickly, and all of my other software applications are very responsive. Any suggestions on how I might fix this issue?

    Before this problem began, a web page would usually take an average of about 15-20 seconds to load
    I would call that slow! 1-5 seconds should be the maximum.
    The following usually works on both Tiger and Leopard:
    (First, if yours is an Intel Mac, check that Safari is not running in Rosetta, which is enough to slow it to a crawl.)
    Adding DNS codes to your Network Settings, should gives good results in terms of speed-up:
    Open System Preferences/Network. Double click on your connection type, or select it in the drop-down menu. Click on TCP/IP and in the box marked 'DNS Servers' enter the following two numbers:
    208.67.222.222
    208.67.220.220
    (An explanation of why that is both safe and a good idea can be read here: http://www.labnol.org/internet/tools/opendsn-what-is-opendns-why-required-2/2587 / )
    Whilst in System Preferences/Network you should also turn off 'IPv6' in your preference pane, as otherwise you may not get the full speed benefit (the DNS resolver will default to making SRV queries). If you want to know what IPv6 is:
    This is Apple's guidance on iPv6:
    http://docs.info.apple.com/article.html?path=Mac/10.5/en/8708.html
    Click on Apply Now and close the window.
    Restart Safari, and repair permissions.
    If that didn't do it, then try this as well:
    Empty Safari's cache (from the Safari menu), then close Safari.
    Go to Home/Library/Safari and delete the following files:
    form values
    download.plist
    Then go to Home/Library/Preferences and delete
    com.apple.Safari.plist
    Repair permissions (in Disk Utility).
    Start up Safari again, and things should have improved.

Maybe you are looking for