Loading a resource with a different content-type with jquery
I've run into a problem with loading files (html, css and js) from
Copy.com (wich is a dropbox-like). I know it's not a CDN but I have huge
amount of files so Copy is a good option for what I'm willing to do. The
problem is that Copy serves those files with content-type = text/plain
(and not text/html or text/css or text/javascript); that's the reason - I
believe - why navigator loads those files as plain text (example:
http://copy.com/N9NLnrlQvzer/residanat/index.html). So as a solution I
decided to use a "loader page" (locally or in another website) wich will
load the content: I've tried to load HTML with $('#container').load(), CSS
with $('head').append('') and JavaScript through $.getScript() but it
seems that there too the content type causes the navigator to ignore those
resources.
Any ideas?
Thanks.
No comments:
Post a Comment