0

We have two example websites:

http://fastpic.ru/ (html4 doctype)

and

http://imagebam.com/ (html5 doctype)

and I need to make a html5 element on both sites via javascript (userscript), the element is <a> with download attribute,

if you try to set a download attribute on html4 (1st) website it simply wouldn't work, you click it - it just opens the link when you click it, no download html5 behavior

So, is there a way to still create and use html5 element on a html4 website?

EDIT: found out firefox doesn't allow cross-origin (even subdomains) download attribute... damn, nothing works like it should in firefox...

Owyn
  • 663
  • 2
  • 8
  • 17

1 Answers1

-2

You can try ta add this on the head of your html4 page

<!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.2/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
![endif]-->
Evrard-c
  • 391
  • 3
  • 14
  • Those are hacks to provide CSS support for HTML 5 elements in HTML 5 documents and for media queries, both in obsolete versions of Internet Explorer. Neither will provides support for the download attribute. Neither provide fixes for any problems caused by the choice of Doctype. – Quentin Feb 24 '17 at 13:46