XMLHttpRequest Stopped Working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Buddha
    Senior Member
    • Mar 2004
    • 825

    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, 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
  • AndrewT
    Administrator
    • Mar 2004
    • 3653

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

    Comment

    • Buddha
      Senior Member
      • Mar 2004
      • 825

      #3
      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, 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

      Comment

      • Buddha
        Senior Member
        • Mar 2004
        • 825

        #4
        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

        Comment

        • Buddha
          Senior Member
          • Mar 2004
          • 825

          #5
          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

          Comment

          • Buddha
            Senior Member
            • Mar 2004
            • 825

            #6
            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

            Comment

            • ZYV
              Senior Member
              • Sep 2005
              • 315

              #7
              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.

              Comment

              Working...