Results 1 to 7 of 7

Thread: XMLHttpRequest Stopped Working

  1. #1
    Senior Member Buddha's Avatar
    Join Date
    Mar 2004
    Location
    Florida USA
    Posts
    825

    Default XMLHttpRequest Stopped Working

    JUST IGNORE THIS ...


    My XLMHttpRequest (XHR) stopped working recently. The problem is the server's HTTP response header is sending content-type application/x-javascript ... most of the time. IE and Firefox both refuse to send XHR with application/x-javascript. This is the second time I've have had problems with content-type (not just Dathorn either), I have little doubt cPanel updates are the culprit. Anyway it's easily fixed, just add this to your .htaccess file:

    Code:
    <FilesMatch "\.js$">
    ForceType text/javascript
    </FilesMatch>
    Hope this stops someone from going bald trying figure out what's the problem is ... because there's no error messages.
    Last edited by Buddha; 02-04-2008 at 11:44 AM.
    "Whatcha mean I shouldn't be rude to my clients?! If you want polite then there will be a substantial fee increase." - Buddha

  2. #2
    Administrator AndrewT's Avatar
    Join Date
    Mar 2004
    Location
    Tulsa, OK
    Posts
    3,634

    Default

    Thanks, I appreciate it. Oddly enough we've not received any tickets regarding this at all.

  3. #3
    Senior Member Buddha's Avatar
    Join Date
    Mar 2004
    Location
    Florida USA
    Posts
    825

    Default

    This doesn't seem to be the problem. It worked for a while then bang!! Broke again. I need to keep poking around.
    Last edited by Buddha; 02-04-2008 at 12:52 PM.
    "Whatcha mean I shouldn't be rude to my clients?! If you want polite then there will be a substantial fee increase." - Buddha

  4. #4
    Senior Member Buddha's Avatar
    Join Date
    Mar 2004
    Location
    Florida USA
    Posts
    825

    Default

    I should be plucked bald shortly ...
    "Whatcha mean I shouldn't be rude to my clients?! If you want polite then there will be a substantial fee increase." - Buddha

  5. #5
    Senior Member Buddha's Avatar
    Join Date
    Mar 2004
    Location
    Florida USA
    Posts
    825

    Default

    Think I found it. It's a rewrite problem. Just ignore this topic ... I'm having one of those days.
    "Whatcha mean I shouldn't be rude to my clients?! If you want polite then there will be a substantial fee increase." - Buddha

  6. #6
    Senior Member Buddha's Avatar
    Join Date
    Mar 2004
    Location
    Florida USA
    Posts
    825

    Default

    Still playing with this but this looks like the problem:

    .htaccess files (or "distributed configuration files") provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof.
    That part seem to be false about 'applying to subdirectories' ... now. Wierd.

    I'm probably way behind the curve and missing something because I've switch gears and working in electronics.
    "Whatcha mean I shouldn't be rude to my clients?! If you want polite then there will be a substantial fee increase." - Buddha

  7. #7
    Senior Member
    Join Date
    Sep 2005
    Location
    Russia, Nizhny Novgorod
    Posts
    315

    Default

    Hmm... from my own experience I can only confirm the last part to be true. Not with the rewrite rules, which are applied to the current directory only, however.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •