Comments (9)
Perhaps you need to re-create YUI instance by call YUI()
after called YUI.add()
.
from yui3.
Can you explain more how that could be done? It is odd that this only occurs if I set a comboBase
though. Using Yahoo's CDN does not cause this problem.
from yui3.
hm.. When set "comboBase": "https://yui.yahooapis.com/combo?"
, it's seems to works. Have you ever tried combo endpoint to work?
from yui3.
It's loading it more than once on the fiddle because it encountered an error. It's not a 200 response, so it attempts again to get it.
from yui3.
@davglass Hmm. When running on my local server using my own comboLoader, even though it receives the correct response (200), it still downloads the CSS 3 times.
When I inspect the requests in Firebug, I can confirm that indeed, the response is sent correctly and a status code of 200 was used.
from yui3.
After more investigation, I think I have found the source of the problem.
The loader needs the correct content-type. In the case of CSS, it should be text\css
. For whatever reason, my loader was setting the content-type to application\javascript
for everything. I think it would be nice if this caveat is noted in the docs and guides.
from yui3.
This is not a caveat, this is just good practice. It's also not
Loaders fault, the browser is failing because the content type is
wrong.
from yui3.
Perhaps caveat wasn't the right word for this, but I would still like to see this noted in the docs for loader (to explain that multiple requests to the same css files is not a bug if the content-type is incorrect). This can potentially save quite a lot of time (I actually spent a fair bit of today trying to find out why this is happening) for people using custom combo loaders.
from yui3.
I'll gladly accept a pull request for the docs, but I feel it's more
"common sense" than an issue to actually call out. A server should
return a proper content type, if not the servers a problem.
from yui3.
Related Issues (20)
- YUI autocompletelist is closing on scroll bar click
- recommended doc mode for the different yui versions?
- Complete local build instructions (new problems) HOT 5
- Detection of Edge from user agent - (YUI-UA)
- NSP Security check errors HOT 2
- event source polyfill performance issue in IE11
- In catalan, the first day of the calendar is Monday
- AutoComplete: List doesn't close when it loses focus after scrolling
- Host access issue HOT 1
- delete this issue
- inconsitent behavior for parse/stringify of querystring module
- Website not working HOT 9
- Mu
- Hdjd
- Eiieekkske
- FreeBSD PR list
- Dudu
- Wrong table then other render!!!
- Critical Issue: Insufficient Entropy in cryptiles
- Certificado SSL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yui3.