View js files in firefox










4















Everytime I try to navigate to a JS file on Firefox I get a save-as dialog. I would like to just be able to view the source in the actual browser and not have to download and open the file in another editor.



Is there any way I can force Firefox to view the files?



EDIT here's a snapshot:



snapshot










share|improve this question



















  • 1





    I don't think you are asking this on the right place.

    – JCOC611
    Feb 14 '11 at 2:45











  • Odd. Firefox is perfectly capable of viewing javascript, since it's just plaintext. Is this happening on all sites, or just one in particular?

    – Marc B
    Feb 14 '11 at 2:52











  • it mostly happens on the pagespeed addon and it's kind of frustrating.

    – qwertymk
    Feb 14 '11 at 2:56











  • What content type is the file getting served as?

    – Neil
    Feb 16 '11 at 20:24











  • @Neil heres a snapshot

    – qwertymk
    Feb 16 '11 at 23:44















4















Everytime I try to navigate to a JS file on Firefox I get a save-as dialog. I would like to just be able to view the source in the actual browser and not have to download and open the file in another editor.



Is there any way I can force Firefox to view the files?



EDIT here's a snapshot:



snapshot










share|improve this question



















  • 1





    I don't think you are asking this on the right place.

    – JCOC611
    Feb 14 '11 at 2:45











  • Odd. Firefox is perfectly capable of viewing javascript, since it's just plaintext. Is this happening on all sites, or just one in particular?

    – Marc B
    Feb 14 '11 at 2:52











  • it mostly happens on the pagespeed addon and it's kind of frustrating.

    – qwertymk
    Feb 14 '11 at 2:56











  • What content type is the file getting served as?

    – Neil
    Feb 16 '11 at 20:24











  • @Neil heres a snapshot

    – qwertymk
    Feb 16 '11 at 23:44













4












4








4


0






Everytime I try to navigate to a JS file on Firefox I get a save-as dialog. I would like to just be able to view the source in the actual browser and not have to download and open the file in another editor.



Is there any way I can force Firefox to view the files?



EDIT here's a snapshot:



snapshot










share|improve this question
















Everytime I try to navigate to a JS file on Firefox I get a save-as dialog. I would like to just be able to view the source in the actual browser and not have to download and open the file in another editor.



Is there any way I can force Firefox to view the files?



EDIT here's a snapshot:



snapshot







javascript firefox save-as






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 23 '11 at 1:09









Lance Roberts

17.5k2798127




17.5k2798127










asked Feb 14 '11 at 2:44









qwertymkqwertymk

18.3k2296171




18.3k2296171







  • 1





    I don't think you are asking this on the right place.

    – JCOC611
    Feb 14 '11 at 2:45











  • Odd. Firefox is perfectly capable of viewing javascript, since it's just plaintext. Is this happening on all sites, or just one in particular?

    – Marc B
    Feb 14 '11 at 2:52











  • it mostly happens on the pagespeed addon and it's kind of frustrating.

    – qwertymk
    Feb 14 '11 at 2:56











  • What content type is the file getting served as?

    – Neil
    Feb 16 '11 at 20:24











  • @Neil heres a snapshot

    – qwertymk
    Feb 16 '11 at 23:44












  • 1





    I don't think you are asking this on the right place.

    – JCOC611
    Feb 14 '11 at 2:45











  • Odd. Firefox is perfectly capable of viewing javascript, since it's just plaintext. Is this happening on all sites, or just one in particular?

    – Marc B
    Feb 14 '11 at 2:52











  • it mostly happens on the pagespeed addon and it's kind of frustrating.

    – qwertymk
    Feb 14 '11 at 2:56











  • What content type is the file getting served as?

    – Neil
    Feb 16 '11 at 20:24











  • @Neil heres a snapshot

    – qwertymk
    Feb 16 '11 at 23:44







1




1





I don't think you are asking this on the right place.

– JCOC611
Feb 14 '11 at 2:45





I don't think you are asking this on the right place.

– JCOC611
Feb 14 '11 at 2:45













Odd. Firefox is perfectly capable of viewing javascript, since it's just plaintext. Is this happening on all sites, or just one in particular?

– Marc B
Feb 14 '11 at 2:52





Odd. Firefox is perfectly capable of viewing javascript, since it's just plaintext. Is this happening on all sites, or just one in particular?

– Marc B
Feb 14 '11 at 2:52













it mostly happens on the pagespeed addon and it's kind of frustrating.

– qwertymk
Feb 14 '11 at 2:56





it mostly happens on the pagespeed addon and it's kind of frustrating.

– qwertymk
Feb 14 '11 at 2:56













What content type is the file getting served as?

– Neil
Feb 16 '11 at 20:24





What content type is the file getting served as?

– Neil
Feb 16 '11 at 20:24













@Neil heres a snapshot

– qwertymk
Feb 16 '11 at 23:44





@Neil heres a snapshot

– qwertymk
Feb 16 '11 at 23:44












6 Answers
6






active

oldest

votes


















5














In Firefox, You can use the view-source: psuedo protocol.



Enter into the URL address bar:



view-source:http://server/whatever/your/url/is.js


See also:
How can I convince IE to simply display application/json rather than offer to download it?






share|improve this answer

























  • nice URL, @qwertymk you can also try to click the js link in the view source

    – Eric Fortis
    Feb 14 '11 at 3:07











  • @EricFortis @Cheeso @MarcB I'm looking for something more persistent and don't have to keep typing. When I go to the same site on chrome it displays without any problem

    – qwertymk
    Feb 14 '11 at 3:55











  • @EricFortis @Cheeso @MarcB From what I can tell it's a very common problem. Look up json saveas . I can't seem to find a solution though

    – qwertymk
    Feb 14 '11 at 7:08


















2














I would try the excellent Open in Browser add-on, which is worth having as part of your standard Firefox install.




Have you ever been annoyed when you wanted to see a document and the download popup appears which forces you to select an external application to view it?



This extension allows you to open the document directly in browser. You can also change the MIME type of a document being viewed.




enter image description here



This extension is necessary due to a 9 year old bug in Firefox. When given Content-disposition: attachment by the server, Firefox will only offer to open the resource with an external application or to save it to disk. "Open here, now, in this Firefox" should also be an option for MIME-Types it handles, but currently isn't.



I agree with the last comment, from just 8 days ago:




not allowing content types that Firefox can handle (text/plain, image/png,
etc) is to be viewed directly is a clear-out bug. Dancing through hoops like
saving the file to some random place then opening it manually is a ridiculous
workaround.







share|improve this answer






























    0














    There are three places that Firefox looks for the MIME type of a .js file. (There is a fourth place for some files, such as .html files.)



    The first is in a file in your profile called mimeTypes.rdf; if you have ever clicked on a link to a .js file with an unrecognised MIME type then when you save it Firefox will associate that MIME type with .js files. See Mozilla bug 332690 which describes the equivalent bug for .svg files.



    The second possibility is that your registry entry HKEY_CLASSES_ROOT.jsContent Type may have been set to an incompatible value. If present it should be set to one of the values application/x-javascript, application/javascript or text/javascript.



    Only if these locations are not set then Firefox will use its internal default which I believe is application/x-javascript.






    share|improve this answer






























      0














      There is a nice JSView extension that should help you: https://addons.mozilla.org/en-US/firefox/addon/jsview/






      share|improve this answer






























        0














        If you view the source of a website in Firefox, you can navigate into the javascript files from there also by just clicking on the link in the src="" property.



        (This could potentially be influenced by Firebug that I have installed)






        share|improve this answer






























          0














          Using the devtools it looks like this Ctrl+Shift+K > Debugger > Sources:



          enter image description here






          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f4988417%2fview-js-files-in-firefox%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            6 Answers
            6






            active

            oldest

            votes








            6 Answers
            6






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            5














            In Firefox, You can use the view-source: psuedo protocol.



            Enter into the URL address bar:



            view-source:http://server/whatever/your/url/is.js


            See also:
            How can I convince IE to simply display application/json rather than offer to download it?






            share|improve this answer

























            • nice URL, @qwertymk you can also try to click the js link in the view source

              – Eric Fortis
              Feb 14 '11 at 3:07











            • @EricFortis @Cheeso @MarcB I'm looking for something more persistent and don't have to keep typing. When I go to the same site on chrome it displays without any problem

              – qwertymk
              Feb 14 '11 at 3:55











            • @EricFortis @Cheeso @MarcB From what I can tell it's a very common problem. Look up json saveas . I can't seem to find a solution though

              – qwertymk
              Feb 14 '11 at 7:08















            5














            In Firefox, You can use the view-source: psuedo protocol.



            Enter into the URL address bar:



            view-source:http://server/whatever/your/url/is.js


            See also:
            How can I convince IE to simply display application/json rather than offer to download it?






            share|improve this answer

























            • nice URL, @qwertymk you can also try to click the js link in the view source

              – Eric Fortis
              Feb 14 '11 at 3:07











            • @EricFortis @Cheeso @MarcB I'm looking for something more persistent and don't have to keep typing. When I go to the same site on chrome it displays without any problem

              – qwertymk
              Feb 14 '11 at 3:55











            • @EricFortis @Cheeso @MarcB From what I can tell it's a very common problem. Look up json saveas . I can't seem to find a solution though

              – qwertymk
              Feb 14 '11 at 7:08













            5












            5








            5







            In Firefox, You can use the view-source: psuedo protocol.



            Enter into the URL address bar:



            view-source:http://server/whatever/your/url/is.js


            See also:
            How can I convince IE to simply display application/json rather than offer to download it?






            share|improve this answer















            In Firefox, You can use the view-source: psuedo protocol.



            Enter into the URL address bar:



            view-source:http://server/whatever/your/url/is.js


            See also:
            How can I convince IE to simply display application/json rather than offer to download it?







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited May 23 '17 at 12:34









            Community

            11




            11










            answered Feb 14 '11 at 3:02









            CheesoCheeso

            135k75405638




            135k75405638












            • nice URL, @qwertymk you can also try to click the js link in the view source

              – Eric Fortis
              Feb 14 '11 at 3:07











            • @EricFortis @Cheeso @MarcB I'm looking for something more persistent and don't have to keep typing. When I go to the same site on chrome it displays without any problem

              – qwertymk
              Feb 14 '11 at 3:55











            • @EricFortis @Cheeso @MarcB From what I can tell it's a very common problem. Look up json saveas . I can't seem to find a solution though

              – qwertymk
              Feb 14 '11 at 7:08

















            • nice URL, @qwertymk you can also try to click the js link in the view source

              – Eric Fortis
              Feb 14 '11 at 3:07











            • @EricFortis @Cheeso @MarcB I'm looking for something more persistent and don't have to keep typing. When I go to the same site on chrome it displays without any problem

              – qwertymk
              Feb 14 '11 at 3:55











            • @EricFortis @Cheeso @MarcB From what I can tell it's a very common problem. Look up json saveas . I can't seem to find a solution though

              – qwertymk
              Feb 14 '11 at 7:08
















            nice URL, @qwertymk you can also try to click the js link in the view source

            – Eric Fortis
            Feb 14 '11 at 3:07





            nice URL, @qwertymk you can also try to click the js link in the view source

            – Eric Fortis
            Feb 14 '11 at 3:07













            @EricFortis @Cheeso @MarcB I'm looking for something more persistent and don't have to keep typing. When I go to the same site on chrome it displays without any problem

            – qwertymk
            Feb 14 '11 at 3:55





            @EricFortis @Cheeso @MarcB I'm looking for something more persistent and don't have to keep typing. When I go to the same site on chrome it displays without any problem

            – qwertymk
            Feb 14 '11 at 3:55













            @EricFortis @Cheeso @MarcB From what I can tell it's a very common problem. Look up json saveas . I can't seem to find a solution though

            – qwertymk
            Feb 14 '11 at 7:08





            @EricFortis @Cheeso @MarcB From what I can tell it's a very common problem. Look up json saveas . I can't seem to find a solution though

            – qwertymk
            Feb 14 '11 at 7:08













            2














            I would try the excellent Open in Browser add-on, which is worth having as part of your standard Firefox install.




            Have you ever been annoyed when you wanted to see a document and the download popup appears which forces you to select an external application to view it?



            This extension allows you to open the document directly in browser. You can also change the MIME type of a document being viewed.




            enter image description here



            This extension is necessary due to a 9 year old bug in Firefox. When given Content-disposition: attachment by the server, Firefox will only offer to open the resource with an external application or to save it to disk. "Open here, now, in this Firefox" should also be an option for MIME-Types it handles, but currently isn't.



            I agree with the last comment, from just 8 days ago:




            not allowing content types that Firefox can handle (text/plain, image/png,
            etc) is to be viewed directly is a clear-out bug. Dancing through hoops like
            saving the file to some random place then opening it manually is a ridiculous
            workaround.







            share|improve this answer



























              2














              I would try the excellent Open in Browser add-on, which is worth having as part of your standard Firefox install.




              Have you ever been annoyed when you wanted to see a document and the download popup appears which forces you to select an external application to view it?



              This extension allows you to open the document directly in browser. You can also change the MIME type of a document being viewed.




              enter image description here



              This extension is necessary due to a 9 year old bug in Firefox. When given Content-disposition: attachment by the server, Firefox will only offer to open the resource with an external application or to save it to disk. "Open here, now, in this Firefox" should also be an option for MIME-Types it handles, but currently isn't.



              I agree with the last comment, from just 8 days ago:




              not allowing content types that Firefox can handle (text/plain, image/png,
              etc) is to be viewed directly is a clear-out bug. Dancing through hoops like
              saving the file to some random place then opening it manually is a ridiculous
              workaround.







              share|improve this answer

























                2












                2








                2







                I would try the excellent Open in Browser add-on, which is worth having as part of your standard Firefox install.




                Have you ever been annoyed when you wanted to see a document and the download popup appears which forces you to select an external application to view it?



                This extension allows you to open the document directly in browser. You can also change the MIME type of a document being viewed.




                enter image description here



                This extension is necessary due to a 9 year old bug in Firefox. When given Content-disposition: attachment by the server, Firefox will only offer to open the resource with an external application or to save it to disk. "Open here, now, in this Firefox" should also be an option for MIME-Types it handles, but currently isn't.



                I agree with the last comment, from just 8 days ago:




                not allowing content types that Firefox can handle (text/plain, image/png,
                etc) is to be viewed directly is a clear-out bug. Dancing through hoops like
                saving the file to some random place then opening it manually is a ridiculous
                workaround.







                share|improve this answer













                I would try the excellent Open in Browser add-on, which is worth having as part of your standard Firefox install.




                Have you ever been annoyed when you wanted to see a document and the download popup appears which forces you to select an external application to view it?



                This extension allows you to open the document directly in browser. You can also change the MIME type of a document being viewed.




                enter image description here



                This extension is necessary due to a 9 year old bug in Firefox. When given Content-disposition: attachment by the server, Firefox will only offer to open the resource with an external application or to save it to disk. "Open here, now, in this Firefox" should also be an option for MIME-Types it handles, but currently isn't.



                I agree with the last comment, from just 8 days ago:




                not allowing content types that Firefox can handle (text/plain, image/png,
                etc) is to be viewed directly is a clear-out bug. Dancing through hoops like
                saving the file to some random place then opening it manually is a ridiculous
                workaround.








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 17 '11 at 0:34









                DayDay

                6,51214586




                6,51214586





















                    0














                    There are three places that Firefox looks for the MIME type of a .js file. (There is a fourth place for some files, such as .html files.)



                    The first is in a file in your profile called mimeTypes.rdf; if you have ever clicked on a link to a .js file with an unrecognised MIME type then when you save it Firefox will associate that MIME type with .js files. See Mozilla bug 332690 which describes the equivalent bug for .svg files.



                    The second possibility is that your registry entry HKEY_CLASSES_ROOT.jsContent Type may have been set to an incompatible value. If present it should be set to one of the values application/x-javascript, application/javascript or text/javascript.



                    Only if these locations are not set then Firefox will use its internal default which I believe is application/x-javascript.






                    share|improve this answer



























                      0














                      There are three places that Firefox looks for the MIME type of a .js file. (There is a fourth place for some files, such as .html files.)



                      The first is in a file in your profile called mimeTypes.rdf; if you have ever clicked on a link to a .js file with an unrecognised MIME type then when you save it Firefox will associate that MIME type with .js files. See Mozilla bug 332690 which describes the equivalent bug for .svg files.



                      The second possibility is that your registry entry HKEY_CLASSES_ROOT.jsContent Type may have been set to an incompatible value. If present it should be set to one of the values application/x-javascript, application/javascript or text/javascript.



                      Only if these locations are not set then Firefox will use its internal default which I believe is application/x-javascript.






                      share|improve this answer

























                        0












                        0








                        0







                        There are three places that Firefox looks for the MIME type of a .js file. (There is a fourth place for some files, such as .html files.)



                        The first is in a file in your profile called mimeTypes.rdf; if you have ever clicked on a link to a .js file with an unrecognised MIME type then when you save it Firefox will associate that MIME type with .js files. See Mozilla bug 332690 which describes the equivalent bug for .svg files.



                        The second possibility is that your registry entry HKEY_CLASSES_ROOT.jsContent Type may have been set to an incompatible value. If present it should be set to one of the values application/x-javascript, application/javascript or text/javascript.



                        Only if these locations are not set then Firefox will use its internal default which I believe is application/x-javascript.






                        share|improve this answer













                        There are three places that Firefox looks for the MIME type of a .js file. (There is a fourth place for some files, such as .html files.)



                        The first is in a file in your profile called mimeTypes.rdf; if you have ever clicked on a link to a .js file with an unrecognised MIME type then when you save it Firefox will associate that MIME type with .js files. See Mozilla bug 332690 which describes the equivalent bug for .svg files.



                        The second possibility is that your registry entry HKEY_CLASSES_ROOT.jsContent Type may have been set to an incompatible value. If present it should be set to one of the values application/x-javascript, application/javascript or text/javascript.



                        Only if these locations are not set then Firefox will use its internal default which I believe is application/x-javascript.







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Feb 17 '11 at 20:24









                        NeilNeil

                        44k84261




                        44k84261





















                            0














                            There is a nice JSView extension that should help you: https://addons.mozilla.org/en-US/firefox/addon/jsview/






                            share|improve this answer



























                              0














                              There is a nice JSView extension that should help you: https://addons.mozilla.org/en-US/firefox/addon/jsview/






                              share|improve this answer

























                                0












                                0








                                0







                                There is a nice JSView extension that should help you: https://addons.mozilla.org/en-US/firefox/addon/jsview/






                                share|improve this answer













                                There is a nice JSView extension that should help you: https://addons.mozilla.org/en-US/firefox/addon/jsview/







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered Feb 17 '11 at 20:29









                                unclenortonunclenorton

                                1,4901018




                                1,4901018





















                                    0














                                    If you view the source of a website in Firefox, you can navigate into the javascript files from there also by just clicking on the link in the src="" property.



                                    (This could potentially be influenced by Firebug that I have installed)






                                    share|improve this answer



























                                      0














                                      If you view the source of a website in Firefox, you can navigate into the javascript files from there also by just clicking on the link in the src="" property.



                                      (This could potentially be influenced by Firebug that I have installed)






                                      share|improve this answer

























                                        0












                                        0








                                        0







                                        If you view the source of a website in Firefox, you can navigate into the javascript files from there also by just clicking on the link in the src="" property.



                                        (This could potentially be influenced by Firebug that I have installed)






                                        share|improve this answer













                                        If you view the source of a website in Firefox, you can navigate into the javascript files from there also by just clicking on the link in the src="" property.



                                        (This could potentially be influenced by Firebug that I have installed)







                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered Feb 17 '11 at 20:46









                                        Chris MarisicChris Marisic

                                        21.9k18131235




                                        21.9k18131235





















                                            0














                                            Using the devtools it looks like this Ctrl+Shift+K > Debugger > Sources:



                                            enter image description here






                                            share|improve this answer



























                                              0














                                              Using the devtools it looks like this Ctrl+Shift+K > Debugger > Sources:



                                              enter image description here






                                              share|improve this answer

























                                                0












                                                0








                                                0







                                                Using the devtools it looks like this Ctrl+Shift+K > Debugger > Sources:



                                                enter image description here






                                                share|improve this answer













                                                Using the devtools it looks like this Ctrl+Shift+K > Debugger > Sources:



                                                enter image description here







                                                share|improve this answer












                                                share|improve this answer



                                                share|improve this answer










                                                answered Nov 14 '18 at 16:43









                                                jmunschjmunsch

                                                9,12755164




                                                9,12755164



























                                                    draft saved

                                                    draft discarded
















































                                                    Thanks for contributing an answer to Stack Overflow!


                                                    • Please be sure to answer the question. Provide details and share your research!

                                                    But avoid


                                                    • Asking for help, clarification, or responding to other answers.

                                                    • Making statements based on opinion; back them up with references or personal experience.

                                                    To learn more, see our tips on writing great answers.




                                                    draft saved


                                                    draft discarded














                                                    StackExchange.ready(
                                                    function ()
                                                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f4988417%2fview-js-files-in-firefox%23new-answer', 'question_page');

                                                    );

                                                    Post as a guest















                                                    Required, but never shown





















































                                                    Required, but never shown














                                                    Required, but never shown












                                                    Required, but never shown







                                                    Required, but never shown

































                                                    Required, but never shown














                                                    Required, but never shown












                                                    Required, but never shown







                                                    Required, but never shown







                                                    Popular posts from this blog

                                                    Use pre created SQLite database for Android project in kotlin

                                                    Darth Vader #20

                                                    Ondo