Question: I want to create these 3 tables in my MySQL database:

```
CREATE TABLE categories (
    category_id SMALLINT NOT NULL AUTO_INCREMENT,
    category VARCHAR(255) NOT NULL UNIQUE,
    description TINYTEXT NOT NULL,
    PRIMARY KEY (category_id)
);

CREATE TABLE product (
    product_id SMALLINT NOT NULL AUTO_INCREMENT,
    product VARCHAR(255) NOT NULL UNIQUE,
    description TINYTEXT NOT NULL,
    price DECIMAL(6,2) NOT NULL,
    PRIMARY KEY (product_id)
);

CREATE TABLE categories_products (
    category_id SMALLINT NOT NULL,
    product_id SMALLINT NOT NULL,
    PRIMARY KEY (category_id, product_id),
    FOREIGN KEY (category_id) REFERENCES categories (category_id)
        ON DELETE CASCADE ON UPDATE CASCADE,
    FOREIGN KEY (product_id) REFERENCES products (product_id)
        ON DELETE CASCADE ON UPDATE CASCADE
);

```

The problem is with the last table. I get an error:

> 
> 1005 - Can't create table 'test1.categories\_products' (errno:
>  150)
> 
> 
> 

But when i try to create it without the constraints it works.

```
CREATE TABLE categories_products (
    category_id SMALLINT NOT NULL,
    product_id SMALLINT NOT NULL,
    PRIMARY KEY (category_id, product_id)
);

```

I need the constraints in case a product or a category is removed. What am i doing wrong?

Answer: 
IE doesn't support the data protocol. Per the [documentation](http://msdn.microsoft.com/en-us/library/cc848897%28v=vs.85%29.aspx), the only supported elements/attributes are the following:

```
object (images only)
img
input type=image
link
CSS declarations that accept a URL, such as background, backgroundImage, and so on.

```

Besides, there's also a "IE 10 treats blob URL as cross-origin and denies access" bug filled against IE, still open and active.

I just ran into the same issue when trying to serve CSV data (`data:text/csv;charset=utf-8,...`)
This is an old post but if someone comes across this on a Google search the solution is that you need to have a URL or API endpoint that will return your pdf data, then you put the address to that in your object's data attribute.

```
<object data="/api/pdf"

```

If your pdf is generated by information on the page then you can send that info to the API endpoint in the querystring.