Using a CDN to serve PYJS library and images

28 views
Skip to first unread message

Grant Pitel

unread,
Jul 10, 2014, 6:47:02 AM7/10/14
to pyjs-...@googlegroups.com
I have a pyjs project that I can not fit on my server (its a microcontroller with 512kb of flash).  My latest idea was have all the libraries and images hosted on an external server and the microcontroller would only server the basic html that includes bootstrap.js.  Seems like setting hosted paths would be in pyjsbuild, but the only documentation  found on the topic does not mention it.  Is changing from relative to absolute paths possible in pyjs? 


Grant Pitel

unread,
Jul 12, 2014, 10:05:41 AM7/12/14
to pyjs-...@googlegroups.com
Found a previous post on the topic.  Looking into it...
https://groups.google.com/forum/#!topic/pyjamas-dev/GnkYbfKISvY

Grant Pitel

unread,
Jul 14, 2014, 10:27:52 PM7/14/14
to pyjs-...@googlegroups.com
All the paths needed for setting up a CDN are located in browser.py.  I modified the file so that pyjs requests files from a different server. Works for images and javascript libraries, however, I get a cross domain problem for the generated HTML files. bootstrap.js loads these html files into a iframe, which is fine when the html originates from the same domain, but a a big security no no from different domains (i.e., CDN) that browsers block.  Those html files are huge which is what I am trying to offload them from my microcontroller.   At this point I have given up on CDN and pyjs -- since I think iframes are central to GWT as well? Any one else come to this same conclusion?  I was originally hoping to create CDN build options -- but I don't really see the point now.
Reply all
Reply to author
Forward
0 new messages