Skip to content Skip to sidebar Skip to footer

Is It Possible To Open New Browser Window With Custom Headers And Content?

I have a Sencha Touch web application. I'm trying to generate a calendar event file and open it in another window hence forcing iOS to ask user to import this event into standard c

Solution 1:

If you redirect to or window.open a data URI, you can specify a MIME type.

As a simple test (Safari on iOS 6), I navigated manually to this data URI...

data:text/calendar;base64,QkVHSU46VkNBTEVOREFSDQpWRVJTSU9OOjIuMA0KUFJPRElEOi0vL2hhY2tzdy9oYW5kY2FsLy9OT05TR01MIHYxLjAvL0VODQpCRUdJTjpWRVZFTlQNClVJRDp1aWQxQGV4YW1wbGUuY29tDQpEVFNUQU1QOjE5OTcwNzE0VDE3MDAwMFoNCk9SR0FOSVpFUjtDTj1Kb2huIERvZTpNQUlMVE86am9obi5kb2VAZXhhbXBsZS5jb20NCkRUU1RBUlQ6MTk5NzA3MTRUMTcwMDAwWg0KRFRFTkQ6MTk5NzA3MTVUMDM1OTU5Wg0KU1VNTUFSWTpCYXN0aWxsZSBEYXkgUGFydHkNCkVORDpWRVZFTlQNCkVORDpWQ0FMRU5EQVI=

...and this pops up:

calendar popup

Post a Comment for "Is It Possible To Open New Browser Window With Custom Headers And Content?"